Socket
Socket
Sign inDemoInstall

sift

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sift - npm Package Compare versions

Comparing version 12.0.0 to 12.0.1

3

es5m/operations.js

@@ -15,4 +15,3 @@ var __extends = (this && this.__extends) || (function () {

import { BaseOperation, EqualsOperation, createTester, createQueryOperation, GroupOperation, numericalOperation } from "./core";
import { comparable, isFunction } from "./utils";
import { isArray } from "util";
import { comparable, isFunction, isArray } from "./utils";
var $Ne = /** @class */ (function (_super) {

@@ -19,0 +18,0 @@ __extends($Ne, _super);

@@ -18,3 +18,2 @@ "use strict";

var utils_1 = require("./utils");
var util_1 = require("util");
var $Ne = /** @class */ (function (_super) {

@@ -54,3 +53,3 @@ __extends($Ne, _super);

this._queryOperation.reset();
if (util_1.isArray(owner)) {
if (utils_1.isArray(owner)) {
this._queryOperation.next(item, key, owner);

@@ -57,0 +56,0 @@ this.done = this._queryOperation.done || key === owner.length - 1;

{
"name": "sift",
"description": "mongodb query style array filtering",
"version": "12.0.0",
"version": "12.0.1",
"repository": "crcn/sift.js",

@@ -6,0 +6,0 @@ "sideEffects": false,

@@ -164,3 +164,3 @@ **Installation**: `npm install sift`, or `yarn add sift`

```javascript
//filtered: [{ name: 'Craig', city: 'Minneapolis' }]
//filtered: [{ name: "Tim" }]
[{ name: "Craig", city: "Minneapolis" }, { name: "Tim" }].filter(

@@ -167,0 +167,0 @@ sift({ city: { $exists: false } })

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sift=e():t.sift=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),u=n(2),c=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._test=i.createTester(this.params,this.options.compare)},e.prototype.reset=function(){t.prototype.reset.call(this),this.success=!0},e.prototype.next=function(t){this._test(t)&&(this.done=!0,this.success=!1)},e}(i.BaseOperation),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.reset(),c.isArray(n)?(this._queryOperation.next(t,e,n),this.done=this._queryOperation.done||e===n.length-1,this.success=this._queryOperation.success):(this.done=!0,this.success=!1)},e}(i.BaseOperation),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.next(t,e,n),this.done=this._queryOperation.done,this.success=!this._queryOperation.success},e}(i.BaseOperation),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){var t=this;this._ops=this.params.map((function(e){return i.createQueryOperation(e,null,t.options)}))},e.prototype.reset=function(){this.done=!1,this.success=!1;for(var t=0,e=this._ops.length;t<e;t++)this._ops[t].reset()},e.prototype.next=function(t,e,n){for(var r=!1,o=!1,i=0,u=this._ops.length;i<u;i++){var c=this._ops[i];if(c.next(t,e,n),c.success){r=!0,o=c.success;break}}this.success=o,this.done=r},e}(i.BaseOperation),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(e,n,r){t.prototype.next.call(this,e,n,r),this.success=!this.success},e}(p),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){n.hasOwnProperty(e)===this.params&&(this.done=!0,this.success=!0)},e}(i.BaseOperation),h=function(t){function e(e,n,r){return t.call(this,e,n,r,e.map((function(t){return i.createQueryOperation(t,n,r)})))||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(i.GroupOperation);e.$eq=function(t,e,n){return new i.EqualsOperation(t,e,n)},e.$ne=function(t,e,n){return new s(t,e,n)},e.$or=function(t,e,n){return new p(t,e,n)},e.$nor=function(t,e,n){return new l(t,e,n)},e.$elemMatch=function(t,e,n){return new a(t,e,n)},e.$nin=function(t,e,n){return new l(t,e,n)},e.$in=function(t,e,n){return new p(t,e,n)},e.$lt=i.numericalOperation((function(t){return function(e){return e<t}})),e.$lte=i.numericalOperation((function(t){return function(e){return e<=t}})),e.$gt=i.numericalOperation((function(t){return function(e){return e>t}})),e.$gte=i.numericalOperation((function(t){return function(e){return e>=t}})),e.$mod=function(t,e,n){var r=t[0],o=t[1];return new i.EqualsOperation((function(t){return u.comparable(t)%r===o}),e,n)},e.$exists=function(t,e,n){return new y(t,e,n)},e.$regex=function(t,e,n){return new i.EqualsOperation(new RegExp(t,e.$options),e,n)},e.$not=function(t,e,n){return new f(t,e,n)},e.$type=function(t,e,n){return new i.EqualsOperation((function(e){return null!=e&&(e instanceof t||e.constructor===t)}),e,n)},e.$and=function(t,e,n){return new h(t,e,n)},e.$all=e.$and,e.$size=function(t,e,n){return new i.EqualsOperation((function(e){return e&&e.length===t}),e,n)},e.$options=function(){return null},e.$where=function(t,e,n){var r;if(!u.isFunction(t))throw new Error('In CSP mode, sift does not support strings in "$where" condition');return r=t,new i.EqualsOperation((function(t){return r.bind(t)(t)}),e,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),u=function(t,e,n,r,o,c){var s=e[r];if(i.isArray(t)&&isNaN(Number(s)))for(var a=0,f=t.length;a<f;a++)if(!u(t[a],e,n,r,a,t))return!1;return r===e.length||null==t?n(t,o,c):u(t[s],e,n,r+1,s,t)},c=function(){function t(t,e,n){this.params=t,this.owneryQuery=e,this.options=n,this.init()}return t.prototype.init=function(){},t.prototype.reset=function(){this.done=!1,this.success=!1},t}();e.BaseOperation=c;var s=function(t){function e(e,n,r,o){var i=t.call(this,e,n,r)||this;return i._children=o,i}return o(e,t),e.prototype.reset=function(){this.success=!1,this.done=!1;for(var t=0,e=this._children.length;t<e;t++)this._children[t].reset()},e.prototype.childrenNext=function(t,e,n){for(var r=!0,o=!0,i=0,u=this._children.length;i<u;i++){var c=this._children[i];if(c.next(t,e,n),c.success||(o=!1),c.done){if(!c.success)break}else r=!1}this.done=r,this.success=o},e}(c);e.GroupOperation=s;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(s);e.QueryOperation=a;var f=function(t){function e(e,n,r,o,i){var u=t.call(this,n,r,o,i)||this;return u.keyPath=e,u._nextNestedValue=function(t,e,n){return u.childrenNext(t,e,n),!u.done},u}return o(e,t),e.prototype.next=function(t,e,n){u(t,this.keyPath,this._nextNestedValue,0,e,n)},e}(s);e.NestedOperation=f,e.createTester=function(t,e){if(t instanceof Function)return t;if(t instanceof RegExp)return function(e){return"string"==typeof e&&t.test(e)};var n=i.comparable(t);return function(t){return e(n,i.comparable(t))}};var p=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.init=function(){this._test=e.createTester(this.params,this.options.compare)},n.prototype.next=function(t,e,n){this._test(t,e,n)&&(this.done=!0,this.success=!0)},n}(c);e.EqualsOperation=p,e.createEqualsOperation=function(t,e,n){return new p(t,e,n)};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(){this.done=!0,this.success=!1},e}(c);e.NopeOperation=l,e.numericalOperationCreator=function(t){return function(e,n,r){return null==e?new l(e,n,r):t(e,n,r)}},e.numericalOperation=function(t){return e.numericalOperationCreator((function(e,n,r){var o=typeof i.comparable(e),u=t(e);return new p((function(t){return typeof i.comparable(t)===o&&u(t)}),n,r)}))};var y=function(t,e,n,r){var o=r.operations[t];if(!o)throw new Error("Unsupported operation: "+t);return o(e,n,r)},h=function(t,e,n,r){if(function(t){for(var e in t)if("$"===e.charAt(0))return!0;return!1}(e)){var o=d(e,r),i=o[0];if(o[1].length)throw new Error("Property queries must contain only operations, or exact objects.");return new f(t,e,n,r,i)}return new f(t,e,n,r,[new p(e,n,r)])};e.createQueryOperation=function(t,e,n){var r=d(t,n),o=r[0],i=r[1],u=[];return o.length&&u.push(new f([],t,e,n,o)),u.push.apply(u,i),1===u.length?u[0]:new a(t,e,n,u)};var d=function(t,e){var n=[],r=[];if(!i.isVanillaObject(t))return n.push(new p(t,t,e)),[n,r];for(var o in t)if("$"===o.charAt(0)){var u=y(o,t[o],t,e);null!=u&&n.push(u)}else r.push(h(o.split("."),t[o],t,e));return[n,r]};e.createQueryTester=function(t,n){var r=void 0===n?{}:n,o=r.compare,u=r.operations,c=e.createQueryOperation(t,null,{compare:o||i.equals,operations:Object.assign({},u||{})});return function(t,e,n){return c.reset(),c.next(t,e,n),c.success}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeChecker=function(t){var e="[object "+t+"]";return function(t){return r(t)===e}};var r=function(t){return Object.prototype.toString.call(t)};e.comparable=function(t){return t instanceof Date?t.getTime():e.isArray(t)?t.map(e.comparable):t&&"function"==typeof t.toJSON?t.toJSON():t},e.isArray=e.typeChecker("Array"),e.isObject=e.typeChecker("Object"),e.isFunction=e.typeChecker("Function"),e.isVanillaObject=function(t){return t&&(t.constructor===Object||t.constructor===Array||"function Object() { [native code] }"===t.constructor.toString()||"function Array() { [native code] }"===t.constructor.toString())&&!t.toJSON},e.equals=function(t,n){if(null==t&&t==n)return!0;if(t===n)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(n))return!1;if(e.isArray(t)){if(t.length!==n.length)return!1;for(var r=0,o=t.length;r<o;r++)if(!e.equals(t[r],n[r]))return!1;return!0}if(e.isObject(t)){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(var i in t)if(!e.equals(t[i],n[i]))return!1;return!0}return!1}},function(t,e,n){t.exports=n(4)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1);e.createQueryTester=o.createQueryTester,e.EqualsOperation=o.EqualsOperation,e.createEqualsOperation=o.createEqualsOperation;!function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(0)),e.default=function(t,e){var n=void 0===e?{}:e,i=n.compare,u=n.operations;return o.createQueryTester(t,{compare:i,operations:Object.assign({},r,u)})}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},o=/%[sdj%]/g;e.format=function(t){if(!O(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(c(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,u=String(t).replace(o,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),s=r[n];n<i;s=r[++n])d(s)||!v(s)?u+=" "+s:u+=" "+c(s);return u},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),o=!0}return n.apply(this,arguments)}};var i,u={};function c(t,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&e._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,t,r.depth)}function s(t,e){var n=c.styles[e];return n?"["+c.colors[n][0]+"m"+t+"["+c.colors[n][1]+"m":t}function a(t,e){return t}function f(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return O(o)||(o=f(t,o,r)),o}var i=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(O(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(g(e))return t.stylize(""+e,"number");if(h(e))return t.stylize(""+e,"boolean");if(d(e))return t.stylize("null","null")}(t,n);if(i)return i;var u=Object.keys(n),c=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(u);if(t.showHidden&&(u=Object.getOwnPropertyNames(n)),j(n)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(n);if(0===u.length){if(_(n)){var s=n.name?": "+n.name:"";return t.stylize("[Function"+s+"]","special")}if(m(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(j(n))return p(n)}var a,v="",x=!1,E=["{","}"];(y(n)&&(x=!0,E=["[","]"]),_(n))&&(v=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(v=" "+RegExp.prototype.toString.call(n)),w(n)&&(v=" "+Date.prototype.toUTCString.call(n)),j(n)&&(v=" "+p(n)),0!==u.length||x&&0!=n.length?r<0?m(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),a=x?function(t,e,n,r,o){for(var i=[],u=0,c=e.length;u<c;++u)P(e,String(u))?i.push(l(t,e,n,r,String(u),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(l(t,e,n,r,o,!0))})),i}(t,n,r,c,u):u.map((function(e){return l(t,n,r,c,e,x)})),t.seen.pop(),function(t,e,n){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(a,v,E)):E[0]+v+E[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,n,r,o,i){var u,c,s;if((s=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?c=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(c=t.stylize("[Setter]","special")),P(r,o)||(u="["+o+"]"),c||(t.seen.indexOf(s.value)<0?(c=d(n)?f(t,s.value,null):f(t,s.value,n-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+c.split("\n").map((function(t){return" "+t})).join("\n")):c=t.stylize("[Circular]","special")),b(u)){if(i&&o.match(/^\d+$/))return c;(u=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+c}function y(t){return Array.isArray(t)}function h(t){return"boolean"==typeof t}function d(t){return null===t}function g(t){return"number"==typeof t}function O(t){return"string"==typeof t}function b(t){return void 0===t}function m(t){return v(t)&&"[object RegExp]"===x(t)}function v(t){return"object"==typeof t&&null!==t}function w(t){return v(t)&&"[object Date]"===x(t)}function j(t){return v(t)&&("[object Error]"===x(t)||t instanceof Error)}function _(t){return"function"==typeof t}function x(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(b(i)&&(i=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!u[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=t.pid;u[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else u[n]=function(){};return u[n]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=y,e.isBoolean=h,e.isNull=d,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=O,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=m,e.isObject=v,e.isDate=w,e.isError=j,e.isFunction=_,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(7);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",T(),e.format.apply(e,arguments))},e.inherits=n(8),e._extend=function(t,e){if(!e||!v(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var $="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function q(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if($&&t[$]){var e;if("function"!=typeof(e=t[$]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,o)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),$&&Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=$,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,u=function(){return o.apply(i,arguments)};e.apply(this,n).then((function(e){t.nextTick(u,null,e)}),(function(e){t.nextTick(q,e,u)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(6))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var s,a=[],f=!1,p=-1;function l(){f&&s&&(f=!1,s.length?a=s.concat(a):p=-1,a.length&&y())}function y(){if(!f){var t=c(l);f=!0;for(var e=a.length;e;){for(s=a,a=[];++p<e;)s&&s[p].run();p=-1,e=a.length}s=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function d(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new h(t,e)),1!==a.length||f||c(y)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}])}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sift=e():t.sift=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),u=n(2),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._test=i.createTester(this.params,this.options.compare)},e.prototype.reset=function(){t.prototype.reset.call(this),this.success=!0},e.prototype.next=function(t){this._test(t)&&(this.done=!0,this.success=!1)},e}(i.BaseOperation),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.reset(),u.isArray(n)?(this._queryOperation.next(t,e,n),this.done=this._queryOperation.done||e===n.length-1,this.success=this._queryOperation.success):(this.done=!0,this.success=!1)},e}(i.BaseOperation),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.next(t,e,n),this.done=this._queryOperation.done,this.success=!this._queryOperation.success},e}(i.BaseOperation),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){var t=this;this._ops=this.params.map((function(e){return i.createQueryOperation(e,null,t.options)}))},e.prototype.reset=function(){this.done=!1,this.success=!1;for(var t=0,e=this._ops.length;t<e;t++)this._ops[t].reset()},e.prototype.next=function(t,e,n){for(var r=!1,o=!1,i=0,u=this._ops.length;i<u;i++){var s=this._ops[i];if(s.next(t,e,n),s.success){r=!0,o=s.success;break}}this.success=o,this.done=r},e}(i.BaseOperation),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(e,n,r){t.prototype.next.call(this,e,n,r),this.success=!this.success},e}(p),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){n.hasOwnProperty(e)===this.params&&(this.done=!0,this.success=!0)},e}(i.BaseOperation),h=function(t){function e(e,n,r){return t.call(this,e,n,r,e.map((function(t){return i.createQueryOperation(t,n,r)})))||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(i.GroupOperation);e.$eq=function(t,e,n){return new i.EqualsOperation(t,e,n)},e.$ne=function(t,e,n){return new s(t,e,n)},e.$or=function(t,e,n){return new p(t,e,n)},e.$nor=function(t,e,n){return new f(t,e,n)},e.$elemMatch=function(t,e,n){return new c(t,e,n)},e.$nin=function(t,e,n){return new f(t,e,n)},e.$in=function(t,e,n){return new p(t,e,n)},e.$lt=i.numericalOperation((function(t){return function(e){return e<t}})),e.$lte=i.numericalOperation((function(t){return function(e){return e<=t}})),e.$gt=i.numericalOperation((function(t){return function(e){return e>t}})),e.$gte=i.numericalOperation((function(t){return function(e){return e>=t}})),e.$mod=function(t,e,n){var r=t[0],o=t[1];return new i.EqualsOperation((function(t){return u.comparable(t)%r===o}),e,n)},e.$exists=function(t,e,n){return new l(t,e,n)},e.$regex=function(t,e,n){return new i.EqualsOperation(new RegExp(t,e.$options),e,n)},e.$not=function(t,e,n){return new a(t,e,n)},e.$type=function(t,e,n){return new i.EqualsOperation((function(e){return null!=e&&(e instanceof t||e.constructor===t)}),e,n)},e.$and=function(t,e,n){return new h(t,e,n)},e.$all=e.$and,e.$size=function(t,e,n){return new i.EqualsOperation((function(e){return e&&e.length===t}),e,n)},e.$options=function(){return null},e.$where=function(t,e,n){var r;if(!u.isFunction(t))throw new Error('In CSP mode, sift does not support strings in "$where" condition');return r=t,new i.EqualsOperation((function(t){return r.bind(t)(t)}),e,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),u=function(t,e,n,r,o,s){var c=e[r];if(i.isArray(t)&&isNaN(Number(c)))for(var a=0,p=t.length;a<p;a++)if(!u(t[a],e,n,r,a,t))return!1;return r===e.length||null==t?n(t,o,s):u(t[c],e,n,r+1,c,t)},s=function(){function t(t,e,n){this.params=t,this.owneryQuery=e,this.options=n,this.init()}return t.prototype.init=function(){},t.prototype.reset=function(){this.done=!1,this.success=!1},t}();e.BaseOperation=s;var c=function(t){function e(e,n,r,o){var i=t.call(this,e,n,r)||this;return i._children=o,i}return o(e,t),e.prototype.reset=function(){this.success=!1,this.done=!1;for(var t=0,e=this._children.length;t<e;t++)this._children[t].reset()},e.prototype.childrenNext=function(t,e,n){for(var r=!0,o=!0,i=0,u=this._children.length;i<u;i++){var s=this._children[i];if(s.next(t,e,n),s.success||(o=!1),s.done){if(!s.success)break}else r=!1}this.done=r,this.success=o},e}(s);e.GroupOperation=c;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(c);e.QueryOperation=a;var p=function(t){function e(e,n,r,o,i){var u=t.call(this,n,r,o,i)||this;return u.keyPath=e,u._nextNestedValue=function(t,e,n){return u.childrenNext(t,e,n),!u.done},u}return o(e,t),e.prototype.next=function(t,e,n){u(t,this.keyPath,this._nextNestedValue,0,e,n)},e}(c);e.NestedOperation=p,e.createTester=function(t,e){if(t instanceof Function)return t;if(t instanceof RegExp)return function(e){return"string"==typeof e&&t.test(e)};var n=i.comparable(t);return function(t){return e(n,i.comparable(t))}};var f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.init=function(){this._test=e.createTester(this.params,this.options.compare)},n.prototype.next=function(t,e,n){this._test(t,e,n)&&(this.done=!0,this.success=!0)},n}(s);e.EqualsOperation=f,e.createEqualsOperation=function(t,e,n){return new f(t,e,n)};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(){this.done=!0,this.success=!1},e}(s);e.NopeOperation=l,e.numericalOperationCreator=function(t){return function(e,n,r){return null==e?new l(e,n,r):t(e,n,r)}},e.numericalOperation=function(t){return e.numericalOperationCreator((function(e,n,r){var o=typeof i.comparable(e),u=t(e);return new f((function(t){return typeof i.comparable(t)===o&&u(t)}),n,r)}))};var h=function(t,e,n,r){var o=r.operations[t];if(!o)throw new Error("Unsupported operation: "+t);return o(e,n,r)},y=function(t,e,n,r){if(function(t){for(var e in t)if("$"===e.charAt(0))return!0;return!1}(e)){var o=O(e,r),i=o[0];if(o[1].length)throw new Error("Property queries must contain only operations, or exact objects.");return new p(t,e,n,r,i)}return new p(t,e,n,r,[new f(e,n,r)])};e.createQueryOperation=function(t,e,n){var r=O(t,n),o=r[0],i=r[1],u=[];return o.length&&u.push(new p([],t,e,n,o)),u.push.apply(u,i),1===u.length?u[0]:new a(t,e,n,u)};var O=function(t,e){var n=[],r=[];if(!i.isVanillaObject(t))return n.push(new f(t,t,e)),[n,r];for(var o in t)if("$"===o.charAt(0)){var u=h(o,t[o],t,e);null!=u&&n.push(u)}else r.push(y(o.split("."),t[o],t,e));return[n,r]};e.createQueryTester=function(t,n){var r=void 0===n?{}:n,o=r.compare,u=r.operations,s=e.createQueryOperation(t,null,{compare:o||i.equals,operations:Object.assign({},u||{})});return function(t,e,n){return s.reset(),s.next(t,e,n),s.success}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeChecker=function(t){var e="[object "+t+"]";return function(t){return r(t)===e}};var r=function(t){return Object.prototype.toString.call(t)};e.comparable=function(t){return t instanceof Date?t.getTime():e.isArray(t)?t.map(e.comparable):t&&"function"==typeof t.toJSON?t.toJSON():t},e.isArray=e.typeChecker("Array"),e.isObject=e.typeChecker("Object"),e.isFunction=e.typeChecker("Function"),e.isVanillaObject=function(t){return t&&(t.constructor===Object||t.constructor===Array||"function Object() { [native code] }"===t.constructor.toString()||"function Array() { [native code] }"===t.constructor.toString())&&!t.toJSON},e.equals=function(t,n){if(null==t&&t==n)return!0;if(t===n)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(n))return!1;if(e.isArray(t)){if(t.length!==n.length)return!1;for(var r=0,o=t.length;r<o;r++)if(!e.equals(t[r],n[r]))return!1;return!0}if(e.isObject(t)){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(var i in t)if(!e.equals(t[i],n[i]))return!1;return!0}return!1}},function(t,e,n){t.exports=n(4)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1);e.createQueryTester=o.createQueryTester,e.EqualsOperation=o.EqualsOperation,e.createEqualsOperation=o.createEqualsOperation;!function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(0)),e.default=function(t,e){var n=void 0===e?{}:e,i=n.compare,u=n.operations;return o.createQueryTester(t,{compare:i,operations:Object.assign({},r,u)})}}])}));
//# sourceMappingURL=sift.csp.min.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sift=e():t.sift=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),u=n(2),c=n(5),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._test=i.createTester(this.params,this.options.compare)},e.prototype.reset=function(){t.prototype.reset.call(this),this.success=!0},e.prototype.next=function(t){this._test(t)&&(this.done=!0,this.success=!1)},e}(i.BaseOperation),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.reset(),c.isArray(n)?(this._queryOperation.next(t,e,n),this.done=this._queryOperation.done||e===n.length-1,this.success=this._queryOperation.success):(this.done=!0,this.success=!1)},e}(i.BaseOperation),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.next(t,e,n),this.done=this._queryOperation.done,this.success=!this._queryOperation.success},e}(i.BaseOperation),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){var t=this;this._ops=this.params.map((function(e){return i.createQueryOperation(e,null,t.options)}))},e.prototype.reset=function(){this.done=!1,this.success=!1;for(var t=0,e=this._ops.length;t<e;t++)this._ops[t].reset()},e.prototype.next=function(t,e,n){for(var r=!1,o=!1,i=0,u=this._ops.length;i<u;i++){var c=this._ops[i];if(c.next(t,e,n),c.success){r=!0,o=c.success;break}}this.success=o,this.done=r},e}(i.BaseOperation),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(e,n,r){t.prototype.next.call(this,e,n,r),this.success=!this.success},e}(p),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){n.hasOwnProperty(e)===this.params&&(this.done=!0,this.success=!0)},e}(i.BaseOperation),h=function(t){function e(e,n,r){return t.call(this,e,n,r,e.map((function(t){return i.createQueryOperation(t,n,r)})))||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(i.GroupOperation);e.$eq=function(t,e,n){return new i.EqualsOperation(t,e,n)},e.$ne=function(t,e,n){return new s(t,e,n)},e.$or=function(t,e,n){return new p(t,e,n)},e.$nor=function(t,e,n){return new l(t,e,n)},e.$elemMatch=function(t,e,n){return new a(t,e,n)},e.$nin=function(t,e,n){return new l(t,e,n)},e.$in=function(t,e,n){return new p(t,e,n)},e.$lt=i.numericalOperation((function(t){return function(e){return e<t}})),e.$lte=i.numericalOperation((function(t){return function(e){return e<=t}})),e.$gt=i.numericalOperation((function(t){return function(e){return e>t}})),e.$gte=i.numericalOperation((function(t){return function(e){return e>=t}})),e.$mod=function(t,e,n){var r=t[0],o=t[1];return new i.EqualsOperation((function(t){return u.comparable(t)%r===o}),e,n)},e.$exists=function(t,e,n){return new y(t,e,n)},e.$regex=function(t,e,n){return new i.EqualsOperation(new RegExp(t,e.$options),e,n)},e.$not=function(t,e,n){return new f(t,e,n)},e.$type=function(t,e,n){return new i.EqualsOperation((function(e){return null!=e&&(e instanceof t||e.constructor===t)}),e,n)},e.$and=function(t,e,n){return new h(t,e,n)},e.$all=e.$and,e.$size=function(t,e,n){return new i.EqualsOperation((function(e){return e&&e.length===t}),e,n)},e.$options=function(){return null},e.$where=function(t,e,n){var r;return r=u.isFunction(t)?t:new Function("obj","return "+t),new i.EqualsOperation((function(t){return r.bind(t)(t)}),e,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),u=function(t,e,n,r,o,c){var s=e[r];if(i.isArray(t)&&isNaN(Number(s)))for(var a=0,f=t.length;a<f;a++)if(!u(t[a],e,n,r,a,t))return!1;return r===e.length||null==t?n(t,o,c):u(t[s],e,n,r+1,s,t)},c=function(){function t(t,e,n){this.params=t,this.owneryQuery=e,this.options=n,this.init()}return t.prototype.init=function(){},t.prototype.reset=function(){this.done=!1,this.success=!1},t}();e.BaseOperation=c;var s=function(t){function e(e,n,r,o){var i=t.call(this,e,n,r)||this;return i._children=o,i}return o(e,t),e.prototype.reset=function(){this.success=!1,this.done=!1;for(var t=0,e=this._children.length;t<e;t++)this._children[t].reset()},e.prototype.childrenNext=function(t,e,n){for(var r=!0,o=!0,i=0,u=this._children.length;i<u;i++){var c=this._children[i];if(c.next(t,e,n),c.success||(o=!1),c.done){if(!c.success)break}else r=!1}this.done=r,this.success=o},e}(c);e.GroupOperation=s;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(s);e.QueryOperation=a;var f=function(t){function e(e,n,r,o,i){var u=t.call(this,n,r,o,i)||this;return u.keyPath=e,u._nextNestedValue=function(t,e,n){return u.childrenNext(t,e,n),!u.done},u}return o(e,t),e.prototype.next=function(t,e,n){u(t,this.keyPath,this._nextNestedValue,0,e,n)},e}(s);e.NestedOperation=f,e.createTester=function(t,e){if(t instanceof Function)return t;if(t instanceof RegExp)return function(e){return"string"==typeof e&&t.test(e)};var n=i.comparable(t);return function(t){return e(n,i.comparable(t))}};var p=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.init=function(){this._test=e.createTester(this.params,this.options.compare)},n.prototype.next=function(t,e,n){this._test(t,e,n)&&(this.done=!0,this.success=!0)},n}(c);e.EqualsOperation=p,e.createEqualsOperation=function(t,e,n){return new p(t,e,n)};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(){this.done=!0,this.success=!1},e}(c);e.NopeOperation=l,e.numericalOperationCreator=function(t){return function(e,n,r){return null==e?new l(e,n,r):t(e,n,r)}},e.numericalOperation=function(t){return e.numericalOperationCreator((function(e,n,r){var o=typeof i.comparable(e),u=t(e);return new p((function(t){return typeof i.comparable(t)===o&&u(t)}),n,r)}))};var y=function(t,e,n,r){var o=r.operations[t];if(!o)throw new Error("Unsupported operation: "+t);return o(e,n,r)},h=function(t,e,n,r){if(function(t){for(var e in t)if("$"===e.charAt(0))return!0;return!1}(e)){var o=d(e,r),i=o[0];if(o[1].length)throw new Error("Property queries must contain only operations, or exact objects.");return new f(t,e,n,r,i)}return new f(t,e,n,r,[new p(e,n,r)])};e.createQueryOperation=function(t,e,n){var r=d(t,n),o=r[0],i=r[1],u=[];return o.length&&u.push(new f([],t,e,n,o)),u.push.apply(u,i),1===u.length?u[0]:new a(t,e,n,u)};var d=function(t,e){var n=[],r=[];if(!i.isVanillaObject(t))return n.push(new p(t,t,e)),[n,r];for(var o in t)if("$"===o.charAt(0)){var u=y(o,t[o],t,e);null!=u&&n.push(u)}else r.push(h(o.split("."),t[o],t,e));return[n,r]};e.createQueryTester=function(t,n){var r=void 0===n?{}:n,o=r.compare,u=r.operations,c=e.createQueryOperation(t,null,{compare:o||i.equals,operations:Object.assign({},u||{})});return function(t,e,n){return c.reset(),c.next(t,e,n),c.success}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeChecker=function(t){var e="[object "+t+"]";return function(t){return r(t)===e}};var r=function(t){return Object.prototype.toString.call(t)};e.comparable=function(t){return t instanceof Date?t.getTime():e.isArray(t)?t.map(e.comparable):t&&"function"==typeof t.toJSON?t.toJSON():t},e.isArray=e.typeChecker("Array"),e.isObject=e.typeChecker("Object"),e.isFunction=e.typeChecker("Function"),e.isVanillaObject=function(t){return t&&(t.constructor===Object||t.constructor===Array||"function Object() { [native code] }"===t.constructor.toString()||"function Array() { [native code] }"===t.constructor.toString())&&!t.toJSON},e.equals=function(t,n){if(null==t&&t==n)return!0;if(t===n)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(n))return!1;if(e.isArray(t)){if(t.length!==n.length)return!1;for(var r=0,o=t.length;r<o;r++)if(!e.equals(t[r],n[r]))return!1;return!0}if(e.isObject(t)){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(var i in t)if(!e.equals(t[i],n[i]))return!1;return!0}return!1}},function(t,e,n){t.exports=n(4)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1);e.createQueryTester=o.createQueryTester,e.EqualsOperation=o.EqualsOperation,e.createEqualsOperation=o.createEqualsOperation;!function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(0)),e.default=function(t,e){var n=void 0===e?{}:e,i=n.compare,u=n.operations;return o.createQueryTester(t,{compare:i,operations:Object.assign({},r,u)})}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},o=/%[sdj%]/g;e.format=function(t){if(!O(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(c(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,u=String(t).replace(o,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),s=r[n];n<i;s=r[++n])d(s)||!v(s)?u+=" "+s:u+=" "+c(s);return u},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),o=!0}return n.apply(this,arguments)}};var i,u={};function c(t,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&e._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,t,r.depth)}function s(t,e){var n=c.styles[e];return n?"["+c.colors[n][0]+"m"+t+"["+c.colors[n][1]+"m":t}function a(t,e){return t}function f(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return O(o)||(o=f(t,o,r)),o}var i=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(O(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(g(e))return t.stylize(""+e,"number");if(h(e))return t.stylize(""+e,"boolean");if(d(e))return t.stylize("null","null")}(t,n);if(i)return i;var u=Object.keys(n),c=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(u);if(t.showHidden&&(u=Object.getOwnPropertyNames(n)),j(n)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(n);if(0===u.length){if(_(n)){var s=n.name?": "+n.name:"";return t.stylize("[Function"+s+"]","special")}if(m(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(j(n))return p(n)}var a,v="",x=!1,E=["{","}"];(y(n)&&(x=!0,E=["[","]"]),_(n))&&(v=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(v=" "+RegExp.prototype.toString.call(n)),w(n)&&(v=" "+Date.prototype.toUTCString.call(n)),j(n)&&(v=" "+p(n)),0!==u.length||x&&0!=n.length?r<0?m(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),a=x?function(t,e,n,r,o){for(var i=[],u=0,c=e.length;u<c;++u)P(e,String(u))?i.push(l(t,e,n,r,String(u),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(l(t,e,n,r,o,!0))})),i}(t,n,r,c,u):u.map((function(e){return l(t,n,r,c,e,x)})),t.seen.pop(),function(t,e,n){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(a,v,E)):E[0]+v+E[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function l(t,e,n,r,o,i){var u,c,s;if((s=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?c=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(c=t.stylize("[Setter]","special")),P(r,o)||(u="["+o+"]"),c||(t.seen.indexOf(s.value)<0?(c=d(n)?f(t,s.value,null):f(t,s.value,n-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+c.split("\n").map((function(t){return" "+t})).join("\n")):c=t.stylize("[Circular]","special")),b(u)){if(i&&o.match(/^\d+$/))return c;(u=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+c}function y(t){return Array.isArray(t)}function h(t){return"boolean"==typeof t}function d(t){return null===t}function g(t){return"number"==typeof t}function O(t){return"string"==typeof t}function b(t){return void 0===t}function m(t){return v(t)&&"[object RegExp]"===x(t)}function v(t){return"object"==typeof t&&null!==t}function w(t){return v(t)&&"[object Date]"===x(t)}function j(t){return v(t)&&("[object Error]"===x(t)||t instanceof Error)}function _(t){return"function"==typeof t}function x(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(b(i)&&(i=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!u[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=t.pid;u[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else u[n]=function(){};return u[n]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=y,e.isBoolean=h,e.isNull=d,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=O,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=m,e.isObject=v,e.isDate=w,e.isError=j,e.isFunction=_,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(7);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");return[t.getDate(),T[t.getMonth()],e].join(" ")}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",S(),e.format.apply(e,arguments))},e.inherits=n(8),e._extend=function(t,e){if(!e||!v(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var $="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function q(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if($&&t[$]){var e;if("function"!=typeof(e=t[$]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,o)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),$&&Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=$,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,u=function(){return o.apply(i,arguments)};e.apply(this,n).then((function(e){t.nextTick(u,null,e)}),(function(e){t.nextTick(q,e,u)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(6))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var s,a=[],f=!1,p=-1;function l(){f&&s&&(f=!1,s.length?a=s.concat(a):p=-1,a.length&&y())}function y(){if(!f){var t=c(l);f=!0;for(var e=a.length;e;){for(s=a,a=[];++p<e;)s&&s[p].run();p=-1,e=a.length}s=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function d(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new h(t,e)),1!==a.length||f||c(y)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}])}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sift=e():t.sift=e()}(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),u=n(2),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._test=i.createTester(this.params,this.options.compare)},e.prototype.reset=function(){t.prototype.reset.call(this),this.success=!0},e.prototype.next=function(t){this._test(t)&&(this.done=!0,this.success=!1)},e}(i.BaseOperation),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.reset(),u.isArray(n)?(this._queryOperation.next(t,e,n),this.done=this._queryOperation.done||e===n.length-1,this.success=this._queryOperation.success):(this.done=!0,this.success=!1)},e}(i.BaseOperation),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){this._queryOperation=i.createQueryOperation(this.params,this.owneryQuery,this.options)},e.prototype.reset=function(){this._queryOperation.reset()},e.prototype.next=function(t,e,n){this._queryOperation.next(t,e,n),this.done=this._queryOperation.done,this.success=!this._queryOperation.success},e}(i.BaseOperation),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.init=function(){var t=this;this._ops=this.params.map((function(e){return i.createQueryOperation(e,null,t.options)}))},e.prototype.reset=function(){this.done=!1,this.success=!1;for(var t=0,e=this._ops.length;t<e;t++)this._ops[t].reset()},e.prototype.next=function(t,e,n){for(var r=!1,o=!1,i=0,u=this._ops.length;i<u;i++){var s=this._ops[i];if(s.next(t,e,n),s.success){r=!0,o=s.success;break}}this.success=o,this.done=r},e}(i.BaseOperation),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(e,n,r){t.prototype.next.call(this,e,n,r),this.success=!this.success},e}(p),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){n.hasOwnProperty(e)===this.params&&(this.done=!0,this.success=!0)},e}(i.BaseOperation),h=function(t){function e(e,n,r){return t.call(this,e,n,r,e.map((function(t){return i.createQueryOperation(t,n,r)})))||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(i.GroupOperation);e.$eq=function(t,e,n){return new i.EqualsOperation(t,e,n)},e.$ne=function(t,e,n){return new s(t,e,n)},e.$or=function(t,e,n){return new p(t,e,n)},e.$nor=function(t,e,n){return new f(t,e,n)},e.$elemMatch=function(t,e,n){return new c(t,e,n)},e.$nin=function(t,e,n){return new f(t,e,n)},e.$in=function(t,e,n){return new p(t,e,n)},e.$lt=i.numericalOperation((function(t){return function(e){return e<t}})),e.$lte=i.numericalOperation((function(t){return function(e){return e<=t}})),e.$gt=i.numericalOperation((function(t){return function(e){return e>t}})),e.$gte=i.numericalOperation((function(t){return function(e){return e>=t}})),e.$mod=function(t,e,n){var r=t[0],o=t[1];return new i.EqualsOperation((function(t){return u.comparable(t)%r===o}),e,n)},e.$exists=function(t,e,n){return new l(t,e,n)},e.$regex=function(t,e,n){return new i.EqualsOperation(new RegExp(t,e.$options),e,n)},e.$not=function(t,e,n){return new a(t,e,n)},e.$type=function(t,e,n){return new i.EqualsOperation((function(e){return null!=e&&(e instanceof t||e.constructor===t)}),e,n)},e.$and=function(t,e,n){return new h(t,e,n)},e.$all=e.$and,e.$size=function(t,e,n){return new i.EqualsOperation((function(e){return e&&e.length===t}),e,n)},e.$options=function(){return null},e.$where=function(t,e,n){var r;return r=u.isFunction(t)?t:new Function("obj","return "+t),new i.EqualsOperation((function(t){return r.bind(t)(t)}),e,n)}},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),u=function(t,e,n,r,o,s){var c=e[r];if(i.isArray(t)&&isNaN(Number(c)))for(var a=0,p=t.length;a<p;a++)if(!u(t[a],e,n,r,a,t))return!1;return r===e.length||null==t?n(t,o,s):u(t[c],e,n,r+1,c,t)},s=function(){function t(t,e,n){this.params=t,this.owneryQuery=e,this.options=n,this.init()}return t.prototype.init=function(){},t.prototype.reset=function(){this.done=!1,this.success=!1},t}();e.BaseOperation=s;var c=function(t){function e(e,n,r,o){var i=t.call(this,e,n,r)||this;return i._children=o,i}return o(e,t),e.prototype.reset=function(){this.success=!1,this.done=!1;for(var t=0,e=this._children.length;t<e;t++)this._children[t].reset()},e.prototype.childrenNext=function(t,e,n){for(var r=!0,o=!0,i=0,u=this._children.length;i<u;i++){var s=this._children[i];if(s.next(t,e,n),s.success||(o=!1),s.done){if(!s.success)break}else r=!1}this.done=r,this.success=o},e}(s);e.GroupOperation=c;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(t,e,n){this.childrenNext(t,e,n)},e}(c);e.QueryOperation=a;var p=function(t){function e(e,n,r,o,i){var u=t.call(this,n,r,o,i)||this;return u.keyPath=e,u._nextNestedValue=function(t,e,n){return u.childrenNext(t,e,n),!u.done},u}return o(e,t),e.prototype.next=function(t,e,n){u(t,this.keyPath,this._nextNestedValue,0,e,n)},e}(c);e.NestedOperation=p,e.createTester=function(t,e){if(t instanceof Function)return t;if(t instanceof RegExp)return function(e){return"string"==typeof e&&t.test(e)};var n=i.comparable(t);return function(t){return e(n,i.comparable(t))}};var f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.init=function(){this._test=e.createTester(this.params,this.options.compare)},n.prototype.next=function(t,e,n){this._test(t,e,n)&&(this.done=!0,this.success=!0)},n}(s);e.EqualsOperation=f,e.createEqualsOperation=function(t,e,n){return new f(t,e,n)};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.next=function(){this.done=!0,this.success=!1},e}(s);e.NopeOperation=l,e.numericalOperationCreator=function(t){return function(e,n,r){return null==e?new l(e,n,r):t(e,n,r)}},e.numericalOperation=function(t){return e.numericalOperationCreator((function(e,n,r){var o=typeof i.comparable(e),u=t(e);return new f((function(t){return typeof i.comparable(t)===o&&u(t)}),n,r)}))};var h=function(t,e,n,r){var o=r.operations[t];if(!o)throw new Error("Unsupported operation: "+t);return o(e,n,r)},y=function(t,e,n,r){if(function(t){for(var e in t)if("$"===e.charAt(0))return!0;return!1}(e)){var o=O(e,r),i=o[0];if(o[1].length)throw new Error("Property queries must contain only operations, or exact objects.");return new p(t,e,n,r,i)}return new p(t,e,n,r,[new f(e,n,r)])};e.createQueryOperation=function(t,e,n){var r=O(t,n),o=r[0],i=r[1],u=[];return o.length&&u.push(new p([],t,e,n,o)),u.push.apply(u,i),1===u.length?u[0]:new a(t,e,n,u)};var O=function(t,e){var n=[],r=[];if(!i.isVanillaObject(t))return n.push(new f(t,t,e)),[n,r];for(var o in t)if("$"===o.charAt(0)){var u=h(o,t[o],t,e);null!=u&&n.push(u)}else r.push(y(o.split("."),t[o],t,e));return[n,r]};e.createQueryTester=function(t,n){var r=void 0===n?{}:n,o=r.compare,u=r.operations,s=e.createQueryOperation(t,null,{compare:o||i.equals,operations:Object.assign({},u||{})});return function(t,e,n){return s.reset(),s.next(t,e,n),s.success}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeChecker=function(t){var e="[object "+t+"]";return function(t){return r(t)===e}};var r=function(t){return Object.prototype.toString.call(t)};e.comparable=function(t){return t instanceof Date?t.getTime():e.isArray(t)?t.map(e.comparable):t&&"function"==typeof t.toJSON?t.toJSON():t},e.isArray=e.typeChecker("Array"),e.isObject=e.typeChecker("Object"),e.isFunction=e.typeChecker("Function"),e.isVanillaObject=function(t){return t&&(t.constructor===Object||t.constructor===Array||"function Object() { [native code] }"===t.constructor.toString()||"function Array() { [native code] }"===t.constructor.toString())&&!t.toJSON},e.equals=function(t,n){if(null==t&&t==n)return!0;if(t===n)return!0;if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(n))return!1;if(e.isArray(t)){if(t.length!==n.length)return!1;for(var r=0,o=t.length;r<o;r++)if(!e.equals(t[r],n[r]))return!1;return!0}if(e.isObject(t)){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(var i in t)if(!e.equals(t[i],n[i]))return!1;return!0}return!1}},function(t,e,n){t.exports=n(4)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),o=n(1);e.createQueryTester=o.createQueryTester,e.EqualsOperation=o.EqualsOperation,e.createEqualsOperation=o.createEqualsOperation;!function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(0)),e.default=function(t,e){var n=void 0===e?{}:e,i=n.compare,u=n.operations;return o.createQueryTester(t,{compare:i,operations:Object.assign({},r,u)})}}])}));
//# sourceMappingURL=sift.min.js.map

@@ -15,4 +15,3 @@ import {

} from "./core";
import { Key, comparable, isFunction } from "./utils";
import { isArray } from "util";
import { Key, comparable, isFunction, isArray } from "./utils";

@@ -19,0 +18,0 @@ class $Ne extends BaseOperation<any> {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc