text: !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).FilterData={})}(this,(function(t){"use strict";var n;!function(t){t.EQ="equal",t.GT="greater",t.GTE="greaterorequal",t.LT="less",t.LTE="lessorequal",t.LK="like",t.NE="notequal",t.NLK="notlike"}(n||(n={}));var r=n,e=function(){return(e=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var u in n=arguments[r])Object.prototype.hasOwnProperty.call(n,u)&&(t[u]=n[u]);return t}).apply(this,arguments)};
  /*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0
  
    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.
  
    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */var u=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]};var o=function(t){return function n(r){return 0===arguments.length||u(r)?n:t.apply(this,arguments)}},i=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};var c=function(t){return"[object String]"===Object.prototype.toString.call(t)},a=o((function(t){return!!i(t)||!!t&&("object"==typeof t&&(!c(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))})),f=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},t}();var s=function(t){return new f(t)};var l=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,o){return n.apply(this,arguments)};case 6:return function(t,r,e,u,o,i){return n.apply(this,arguments)};case 7:return function(t,r,e,u,o,i,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,o,i,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,o,i,c,a,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,o,i,c,a,f,s){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}};var p=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return u(r)?n:o((function(n){return t(r,n)}));default:return u(r)&&u(e)?n:u(r)?o((function(n){return t(n,e)})):u(e)?o((function(n){return t(r,n)})):t(r,e)}}},y=p((function(t,n){return l(t.length,(function(){return t.apply(n,arguments)}))}));function h(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function d(t,n,r,e){return t["@@transducer/result"](r[e](y(t["@@transducer/step"],t),n))}var v="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";var g=function(t,n,r){if("function"==typeof t&&(t=s(t)),a(r))return function(t,n,r){for(var e=0,u=r.length;e<u;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}(t,n,r);if("function"==typeof r["fantasy-land/reduce"])return d(t,n,r,"fantasy-land/reduce");if(null!=r[v])return h(t,n,r[v]());if("function"==typeof r.next)return h(t,n,r);if("function"==typeof r.reduce)return d(t,n,r,"reduce");throw new TypeError("reduce: list must be array or iterable")};var b=function t(n,r,e){return function(){for(var o=[],i=0,c=n,a=0;a<r.length||i<arguments.length;){var f;a<r.length&&(!u(r[a])||i>=arguments.length)?f=r[a]:(f=arguments[i],i+=1),o[a]=f,u(f)||(c-=1),a+=1}return c<=0?e.apply(this,o):l(c,t(n,o,e))}},m=p((function(t,n){return 1===t?o(n):l(t,b(t,[],n))})),j=m(4,(function(t,n,r,e){return g(t("function"==typeof n?s(n):n),r,e)}));var S=function(t){return null!=t&&"function"==typeof t["@@transducer/step"]};var A=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!i(u)){for(var o=0;o<t.length;){if("function"==typeof u[t[o]])return u[t[o]].apply(u,e);o+=1}if(S(u)){var c=n.apply(null,e);return c(u)}}return r.apply(this,arguments)}};var O=function(t,n){for(var r=0,e=n.length,u=[];r<e;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u};var w=function(t){return"[object Object]"===Object.prototype.toString.call(t)},x=function(){return this.xf["@@transducer/init"]()},k=function(t){return this.xf["@@transducer/result"](t)},E=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=x,t.prototype["@@transducer/result"]=k,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},t}(),T=p((function(t,n){return new E(t,n)}));var L=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},C=Object.prototype.toString,U=function(){return"[object Arguments]"===C.call(arguments)?function(t){return"[object Arguments]"===C.call(t)}:function(t){return L("callee",t)}}(),N=!{toString:null}.propertyIsEnumerable("toString"),P=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],q=function(){return arguments.propertyIsEnumerable("length")}(),G=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1},I="function"!=typeof Object.keys||q?o((function(t){if(Object(t)!==t)return[];var n,r,e=[],u=q&&U(t);for(n in t)!L(n,t)||u&&"length"===n||(e[e.length]=n);if(N)for(r=P.length-1;r>=0;)L(n=P[r],t)&&!G(e,n)&&(e[e.length]=n),r-=1;return e})):o((function(t){return Object(t)!==t?[]:Object.keys(t)})),K=p(A(["filter"],T,(function(t,n){return w(n)?g((function(r,e){return t(n[e])&&(r[e]=n[e]),r}),{},I(n)):O(t,n)}))),F=o((function(t){return m(t.length,t)}));var _=function(t,n){var r;n=n||[];var e=(t=t||[]).length,u=n.length,o=[];for(r=0;r<e;)o[o.length]=t[r],r+=1;for(r=0;r<u;)o[o.length]=n[r],r+=1;return o};var D=function(t,n){for(var r=0,e=n.length,u=Array(e);r<e;)u[r]=t(n[r]),r+=1;return u},M=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=x,t.prototype["@@transducer/result"]=k,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},t}(),Q=p(A(["fantasy-land/map","map"],p((function(t,n){return new M(t,n)})),(function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return m(n.length,(function(){return t.call(this,n.apply(this,arguments))}));case"[object Object]":return g((function(r,e){return r[e]=t(n[e]),r}),{},I(n));default:return D(t,n)}}))),R=p((function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:g((function(t,r){return _(t,Q(r,n))}),[],t)})),W=p((function(t,n){var r=m(t,n);return m(t,(function(){return g(R,Q(r,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),X=o((function(t){return W(t.length,t)}))(o((function(t){return!t}))),z=p((function(t,n){return n>t?n:t})),B=Number.isInteger||function(t){return t<<0===t},H=p((function(t,n){var r=t<0?n.length+t:t;return c(n)?n.charAt(r):n[r]})),J=p((function(t,n){return t.map((function(t){for(var r,e=n,u=0;u<t.length;){if(null==e)return;r=t[u],e=B(r)?H(r,e):e[r],u+=1}return e}))})),V=p((function(t,n){return J([t],n)[0]})),Y=p((function(t,n){return V([t],n)})),Z=p((function(t,n){return Q(Y(t),n)}));var $=function(t){return function n(r,e,i){switch(arguments.length){case 0:return n;case 1:return u(r)?n:p((function(n,e){return t(r,n,e)}));case 2:return u(r)&&u(e)?n:u(r)?p((function(n,r){return t(n,e,r)})):u(e)?p((function(n,e){return t(r,n,e)})):o((function(n){return t(r,e,n)}));default:return u(r)&&u(e)&&u(i)?n:u(r)&&u(e)?p((function(n,r){return t(n,r,i)})):u(r)&&u(i)?p((function(n,r){return t(n,e,r)})):u(e)&&u(i)?p((function(n,e){return t(r,n,e)})):u(r)?o((function(n){return t(n,e,i)})):u(e)?o((function(n){return t(r,n,i)})):u(i)?o((function(n){return t(r,e,n)})):t(r,e,i)}}},tt=$(g),nt=o((function(t){return m(tt(z,0,Z("length",t)),(function(){for(var n=0,r=t.length;n<r;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0}))})),rt=o((function(t){return m(tt(z,0,Z("length",t)),(function(){for(var n=0,r=t.length;n<r;){if(t[n].apply(this,arguments))return!0;n+=1}return!1}))})),et=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=x,t.prototype["@@transducer/result"]=k,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},t}(),ut=p((function(t,n){return new et(t,n)}));var ot=$(function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return i(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}}("slice",(function(t,n,r){return Array.prototype.slice.call(r,t,n)}))),it=p(A(["drop"],ut,(function(t,n){return ot(Math.max(0,t),1/0,n)})));var ct=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},at=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=x,t.prototype["@@transducer/result"]=k,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.n>=0&&this.i>=this.n?ct(r):r},t}(),ft=p(A(["take"],p((function(t,n){return new at(t,n)})),(function(t,n){return ot(0,t<0?1/0:t,n)})));function st(t,n){return t.push(n),t}function lt(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.reduceRight((function(t,n){return Array.isArray(t)||(t=[t]),n.apply(void 0,t)}),n)}}var pt,yt=function(t,n,r){var e=t.key,u=t.value,o=r[e];return"number"==typeof o?o===+u:Array.isArray(o)?n?o.includes(u):o.map((function(t){return t.toString().toUpperCase()})).includes(u.toString().toUpperCase()):n?o===u.toString():o.toUpperCase()===u.toString().toUpperCase()},ht=function(t,n,r){var e=t.key,u=t.value,o=r[e];return!Array.isArray(o)&&("number"==typeof o?o>+u:n?o>u:o.toUpperCase()>u.toString().toUpperCase())},dt=F((function(t,n,r,e){var u=e[n.key];return!Array.isArray(u)&&t(n,r,e)})),vt=dt(nt([X(ht),X(yt)])),gt=dt(X(vt)),bt=dt(X(ht)),mt=function(t,n,r){var e=t.key,u=t.value,o=r[e];return!Array.isArray(o)&&(n?o.toString().includes(u.toString()):o.toString().toUpperCase().includes(u.toString().toUpperCase()))},jt=X(yt),St=dt(X(mt)),At=((pt={})[r.EQ]=yt,pt[r.GT]=ht,pt[r.GTE]=gt,pt[r.LT]=vt,pt[r.LTE]=bt,pt[r.LK]=mt,pt[r.NE]=jt,pt[r.NLK]=St,pt),Ot=F((function(t,n,r,e){return null==e[n.key]?t:r(e)})),wt={caseSensitive:!1,includeNull:!1};function xt(t,n,r){var e=r(t,n.caseSensitive);return Ot(n.includeNull,t,e)}t.SearchType=r,t.filterData=function(t,n,r){void 0===r&&(r={});var u=n.filter((function(t){var n=t.value;return""!==n&&null!=n}));if(0===u.length)return function(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;var e=Array(t),u=0;for(n=0;n<r;n++)for(var o=arguments[n],i=0,c=o.length;i<c;i++,u++)e[u]=o[i];return e}(t);var o=e(e({},wt),r),i=u.map((function(t){var n,r=t.key,e=t.type,u=F(At[e]);return n="string"==typeof r?xt(t,o,u):rt(r.map((function(n){return xt({key:n,value:t.value,type:t.type},o,u)}))),K(n)}));null!=o.offset&&null!=o.limit&&(i.push(it(o.offset)),i.push(ft(o.limit)));var c=lt.apply(void 0,i);return j(c,st,[],t)},Object.defineProperty(t,"__esModule",{value:!0})}));
  