import{ITSELF as r,createInterpreter as n}from"@ucast/core";function t(r,n,t){for(var u=0,e=r.length;un?1:-1}function y(r,t){return void 0===t&&(t={}),n(r,i({get:a,compare:l},t))}var b=function(r,n,t){var u=t.interpret;return r.value.some((function(r){return u(r,n)}))},m=function(r,n,t){return!b(r,n,t)},d=function(r,n,t){var u=t.interpret;return r.value.every((function(r){return u(r,n)}))},g=function(r,n,t){return!(0,t.interpret)(r.value[0],n)},p=function(r,n,u){var e=u.compare,o=(0,u.get)(n,r.field);return Array.isArray(o)&&!Array.isArray(r.value)?t(o,r.value,e):0===e(o,r.value)},A=function(r,n,t){return!p(r,n,t)},s=o((function(r,n,t){var u=t.compare(n,r.value);return 0===u||-1===u})),h=o((function(r,n,t){return-1===t.compare(n,r.value)})),j=o((function(r,n,t){return 1===t.compare(n,r.value)})),w=o((function(r,n,t){var u=t.compare(n,r.value);return 0===u||1===u})),_=function(n,t,e){var o=e.get;if(n.field===r)return void 0!==t;var i=c(t,n.field,o),f=i[0],a=i[1],v=function(r){return null==r?Boolean(r)===n.value:r.hasOwnProperty(a)===n.value};return u(f,a)?f.some(v):v(f)},x=o((function(r,n){return"number"==typeof n&&n%r.value[0]===r.value[1]})),O=function(n,t,e){var o=e.get,i=c(t,n.field,o),f=i[0],a=i[1],v=function(r){var t=o(r,a);return Array.isArray(t)&&t.length===n.value};return n.field!==r&&u(f,a)?f.some(v):v(f)},N=o((function(r,n){return"string"==typeof n&&r.value.test(n)})),q=o((function(r,n,u){var e=u.compare;return t(r.value,n,e)})),z=function(r,n,t){return!q(r,n,t)},B=function(r,n,u){var e=u.compare,o=(0,u.get)(n,r.field);return Array.isArray(o)&&r.value.every((function(r){return t(o,r,e)}))},E=function(r,n,t){var u=t.interpret,e=(0,t.get)(n,r.field);return Array.isArray(e)&&e.some((function(n){return u(r.value,n)}))},M=function(r,n){return r.value.call(n)},S=i({},Object.freeze({__proto__:null,or:b,nor:m,and:d,not:g,eq:p,ne:A,lte:s,lt:h,gt:j,gte:w,exists:_,mod:x,size:O,regex:N,within:q,nin:z,all:B,elemMatch:E,where:M}),{in:q}),U=y(S);export{B as all,S as allInterpreters,d as and,l as compare,v as createGetter,y as createJsInterpreter,E as elemMatch,p as eq,_ as exists,a as getObjectField,c as getObjectFieldCursor,j as gt,w as gte,U as interpret,h as lt,s as lte,x as mod,A as ne,z as nin,m as nor,g as not,b as or,N as regex,O as size,M as where,q as within}; //# sourceMappingURL=index.js.map