Socket
Socket
Sign inDemoInstall

fuse.js

Package Overview
Dependencies
0
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0-beta.0 to 6.0.0-beta.1

67

dist/fuse.basic.common.js
/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -185,3 +185,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

if (!hasOwn.call(key, 'name')) {
throw new Error('Key must contain a name');
throw new Error('Key must contain a `name`');
}

@@ -195,3 +195,3 @@

if (weight <= 0) {
throw new Error('"weight" property in key must be a positive integer');
throw new Error('`weight` property in key must be a positive integer');
}

@@ -238,5 +238,5 @@ }

var _get = function _get(obj, path) {
var deepGet = function deepGet(obj, path) {
if (!path) {
// If there's no path left, we've gotten to the object we care about.
// If there's no path left, we've arrived at the object we care about.
list.push(obj);

@@ -255,15 +255,17 @@ } else {

if (isDefined(value)) {
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
if (!isDefined(value)) {
return;
}
for (var i = 0, len = value.length; i < len; i += 1) {
_get(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
_get(value, remaining);
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
for (var i = 0, len = value.length; i < len; i += 1) {
deepGet(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
deepGet(value, remaining);
}

@@ -273,9 +275,4 @@ }

_get(obj, path);
if (arr) {
return list;
}
return list[0];
deepGet(obj, path);
return arr ? list : list[0];
}

@@ -1058,3 +1055,3 @@

if (index && !(index instanceof FuseIndex)) {
throw new Error('Incorrect index type');
throw new Error('Incorrect `index` type');
}

@@ -1096,3 +1093,2 @@

var results = [];
var _this$options = this.options,

@@ -1103,10 +1099,3 @@ includeMatches = _this$options.includeMatches,

sortFn = _this$options.sortFn;
if (isString(query)) {
var searcher = createSearcher(query, this.options);
results = isString(this._docs[0]) ? this._searchStringArrayWith(searcher) : this._searchObjectArrayWith(searcher);
} else {
results = this._searchLogical(query);
}
var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, this._keyStore);

@@ -1128,4 +1117,5 @@

}, {
key: "_searchStringArrayWith",
value: function _searchStringArrayWith(searcher) {
key: "_searchStringList",
value: function _searchStringList(query) {
var searcher = createSearcher(query, this.options);
var records = this._myIndex.records;

@@ -1244,6 +1234,7 @@ var results = []; // Iterate over every string in the index

}, {
key: "_searchObjectArrayWith",
value: function _searchObjectArrayWith(searcher) {
key: "_searchObjectList",
value: function _searchObjectList(query) {
var _this2 = this;
var searcher = createSearcher(query, this.options);
var _this$_myIndex2 = this._myIndex,

@@ -1389,3 +1380,3 @@ keys = _this$_myIndex2.keys,

Fuse.version = '6.0.0-beta.0';
Fuse.version = '6.0.0-beta.1';
Fuse.createIndex = createIndex;

@@ -1392,0 +1383,0 @@ Fuse.parseIndex = parseIndex;

/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -69,3 +69,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

if (!hasOwn.call(key, 'name')) {
throw new Error('Key must contain a name')
throw new Error('Key must contain a `name`')
}

@@ -79,3 +79,3 @@ keyName = key.name;

throw new Error(
'"weight" property in key must be a positive integer'
'`weight` property in key must be a positive integer'
)

@@ -113,5 +113,5 @@ }

const _get = (obj, path) => {
const deepGet = (obj, path) => {
if (!path) {
// If there's no path left, we've gotten to the object we care about.
// If there's no path left, we've arrived at the object we care about.
list.push(obj);

@@ -131,15 +131,17 @@ } else {

if (isDefined(value)) {
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true;
// Search each item in the array.
for (let i = 0, len = value.length; i < len; i += 1) {
_get(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
_get(value, remaining);
if (!isDefined(value)) {
return
}
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true;
// Search each item in the array.
for (let i = 0, len = value.length; i < len; i += 1) {
deepGet(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
deepGet(value, remaining);
}

@@ -149,9 +151,5 @@ }

_get(obj, path);
deepGet(obj, path);
if (arr) {
return list
}
return list[0]
return arr ? list : list[0]
}

@@ -869,2 +867,3 @@

this._keyStore = new KeyStore(this.options.keys);
this.setCollection(docs, index);

@@ -877,3 +876,3 @@ }

if (index && !(index instanceof FuseIndex)) {
throw new Error('Incorrect index type')
throw new Error('Incorrect `index` type')
}

@@ -907,16 +906,10 @@

search(query, { limit = -1 } = {}) {
let results = [];
const { includeMatches, includeScore, shouldSort, sortFn } = this.options;
if (isString(query)) {
const searcher = createSearcher(query, this.options);
let results = isString(query)
? isString(this._docs[0])
? this._searchStringList(query)
: this._searchObjectList(query)
: this._searchLogical(query);
results = isString(this._docs[0])
? this._searchStringArrayWith(searcher)
: this._searchObjectArrayWith(searcher);
} else {
results = this._searchLogical(query);
}
computeScore$1(results, this._keyStore);

@@ -938,3 +931,4 @@

_searchStringArrayWith(searcher) {
_searchStringList(query) {
const searcher = createSearcher(query, this.options);
const { records } = this._myIndex;

@@ -1026,3 +1020,4 @@ const results = [];

_searchObjectArrayWith(searcher) {
_searchObjectList(query) {
const searcher = createSearcher(query, this.options);
const { keys, records } = this._myIndex;

@@ -1150,3 +1145,3 @@ const results = [];

Fuse.version = '6.0.0-beta.0';
Fuse.version = '6.0.0-beta.1';
Fuse.createIndex = createIndex;

@@ -1153,0 +1148,0 @@ Fuse.parseIndex = parseIndex;

/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
function e(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function t(e){return"string"==typeof e}function s(e){return"number"==typeof e}function n(e){return null!=e}function r(e){return!e.trim().length}const i=Object.prototype.hasOwnProperty;class c{constructor(e){this._keys={},this._keyNames=[];let s=0;e.forEach(e=>{let n,r=1;if(t(e))n=e;else{if(!i.call(e,"name"))throw new Error("Key must contain a name");if(n=e.name,i.call(e,"weight")&&(r=e.weight,r<=0))throw new Error('"weight" property in key must be a positive integer')}this._keyNames.push(n),this._keys[n]={weight:r},s+=r}),this._keyNames.forEach(e=>{this._keys[e].weight/=s})}get(e,t){return this._keys[e]&&this._keys[e][t]}keys(){return this._keyNames}toJSON(){return JSON.stringify(this._keys)}}var o={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(r,i){let c=[],o=!1;const h=(r,i)=>{if(i){const a=i.indexOf(".");let l=i,d=null;-1!==a&&(l=i.slice(0,a),d=i.slice(a+1));const u=r[l];if(n(u))if(d||!t(u)&&!s(u))if(e(u)){o=!0;for(let e=0,t=u.length;e<t;e+=1)h(u[e],d)}else d&&h(u,d);else c.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(u))}else c.push(r)};return h(r,i),o?c:c[0]}}};const h=/[^ ]+/g;class a{constructor({getFn:e=o.getFn}={}){this.norm=function(e=3){const t=new Map;return{get(s){const n=s.match(h).length;if(t.has(n))return t.get(n);const r=parseFloat((1/Math.sqrt(n)).toFixed(e));return t.set(n,r),r},clear(){t.clear()}}}(3),this.getFn=e,this.isCreated=!1,this.setRecords()}setCollection(e=[]){this.docs=e}setRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,t(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const s=this.size();t(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t<s;t+=1)this.records[t].i-=1}size(){return this.records.length}_addString(e,t){if(!n(e)||r(e))return;let s={v:e,i:t,n:this.norm.get(e)};this.records.push(s)}_addObject(s,i){let c={i:i,$:{}};this.keys.forEach((i,o)=>{let h=this.getFn(s,i);if(n(h))if(e(h)){let s=[];const i=[{nestedArrIndex:-1,value:h}];for(;i.length;){const{nestedArrIndex:c,value:o}=i.pop();if(n(o))if(t(o)&&!r(o)){let e={v:o,i:c,n:this.norm.get(o)};s.push(e)}else e(o)&&o.forEach((e,t)=>{i.push({nestedArrIndex:t,value:e})})}c.$[o]=s}else if(!r(h)){let e={v:h,n:this.norm.get(h)};c.$[o]=e}}),this.records.push(c)}toJSON(){return{keys:this.keys,records:this.records}}}function l(e,t,{getFn:s=o.getFn}={}){let n=new a({getFn:s});return n.setKeys(e),n.setCollection(t),n.create(),n}function d(e,t){const s=e.matches;if(t.matches=[],n(s))for(let e=0,r=s.length;e<r;e+=1){let r=s[e];if(!n(r.indices)||0===r.indices.length)continue;const{indices:i,value:c}=r;let o={indices:i,value:c};r.key&&(o.key=r.key),r.idx>-1&&(o.refIndex=r.idx),t.matches.push(o)}}function u(e,t){t.score=e.score}function f(e,{errors:t=0,currentLocation:s=0,expectedLocation:n=0,distance:r=o.distance}={}){const i=t/e.length,c=Math.abs(n-s);return r?i+c/r:c?1:i}function g(e,t,s,{location:n=o.location,distance:r=o.distance,threshold:i=o.threshold,findAllMatches:c=o.findAllMatches,minMatchCharLength:h=o.minMatchCharLength,includeMatches:a=o.includeMatches}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const l=t.length,d=e.length,u=Math.max(0,Math.min(n,d));let g=i,p=u;const y=[];if(a)for(let e=0;e<d;e+=1)y[e]=0;let m;for(;(m=e.indexOf(t,p))>-1;){let e=f(t,{currentLocation:m,expectedLocation:u,distance:r});if(g=Math.min(e,g),p=m+l,a){let e=0;for(;e<l;)y[m+e]=1,e+=1}}p=-1;let M=[],k=1,x=l+d;const _=1<<(l<=31?l-1:30);for(let n=0;n<l;n+=1){let i=0,o=x;for(;i<o;){f(t,{errors:n,currentLocation:u+o,expectedLocation:u,distance:r})<=g?i=o:x=o,o=Math.floor((x-i)/2+i)}x=o;let h=Math.max(1,u-o+1),m=c?d:Math.min(u+o,d)+l,v=Array(m+2);v[m+1]=(1<<n)-1;for(let i=m;i>=h;i-=1){let c=i-1,o=s[e.charAt(c)];if(o&&a&&(y[c]=1),v[i]=(v[i+1]<<1|1)&o,0!==n&&(v[i]|=(M[i+1]|M[i])<<1|1|M[i+1]),v[i]&_&&(k=f(t,{errors:n,currentLocation:c,expectedLocation:u,distance:r}),k<=g)){if(g=k,p=c,p<=u)break;h=Math.max(1,2*u-p)}}if(f(t,{errors:n+1,currentLocation:u,expectedLocation:u,distance:r})>g)break;M=v}let v={isMatch:p>=0,score:Math.max(.001,k)};return a&&(v.indices=function(e=[],t=o.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let c=e.length;i<c;i+=1){let c=e[i];c&&-1===n?n=i:c||-1===n||(r=i-1,r-n+1>=t&&s.push([n,r]),n=-1)}return e[i-1]&&i-n>=t&&s.push([n,i-1]),s}(y,h)),v}function p(e){let t={},s=e.length;for(let n=0;n<s;n+=1)t[e.charAt(n)]=0;for(let n=0;n<s;n+=1)t[e.charAt(n)]|=1<<s-n-1;return t}class y{constructor(e,{location:t=o.location,threshold:s=o.threshold,distance:n=o.distance,includeMatches:r=o.includeMatches,findAllMatches:i=o.findAllMatches,minMatchCharLength:c=o.minMatchCharLength,isCaseSensitive:h=o.isCaseSensitive}={}){this.options={location:t,threshold:s,distance:n,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:h},this.pattern=h?e:e.toLowerCase(),this.chunks=[];let a=0;for(;a<this.pattern.length;){let e=this.pattern.substring(a,a+32);this.chunks.push({pattern:e,alphabet:p(e)}),a+=32}}searchIn(e){const{isCaseSensitive:t,includeMatches:s}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return s&&(t.indices=[[0,e.length-1]]),t}const{location:n,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:o}=this.options;let h=[],a=0,l=!1;this.chunks.forEach(({pattern:t,alphabet:d},u)=>{const{isMatch:f,score:p,indices:y}=g(e,t,d,{location:n+32*u,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:o,includeMatches:s});f&&(l=!0),a+=p,f&&y&&(h=[...h,...y])});let d={isMatch:l,score:l?a/this.chunks.length:1};return l&&s&&(d.indices=h),d}}const m=[];function M(e,t){for(let s=0,n=m.length;s<n;s+=1){let n=m[s];if(n.condition(e,t))return new n(e,t)}return new y(e,t)}const k="$and",x="$or",_=e=>!(!e[k]&&!e[x]),v=e=>({[k]:Object.keys(e).map(t=>({[t]:e[t]}))});function A(s,n,{auto:r=!0}={}){const i=s=>{let c=Object.keys(s);if(c.length>1&&!_(s))return i(v(s));let o=c[0];if((t=>!e(t)&&"object"==typeof t&&!_(t))(s)){const e=s[o];if(!t(e))throw new Error(`Invalid value for key "${o}"`);const i={key:o,pattern:e};return r&&(i.searcher=M(e,n)),i}let h={children:[],operator:o};return c.forEach(t=>{const n=s[t];e(n)&&n.forEach(e=>{h.children.push(i(e))})}),h};return _(s)||(s=v(s)),i(s)}class w{constructor(e,t={},s){this.options={...o,...t},this._keyStore=new c(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof a))throw new Error("Incorrect index type");this._myIndex=t||l(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}add(e){n(e)&&(this._docs.push(e),this._myIndex.add(e))}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){let r=[];const{includeMatches:i,includeScore:c,shouldSort:h,sortFn:a}=this.options;if(t(e)){const s=M(e,this.options);r=t(this._docs[0])?this._searchStringArrayWith(s):this._searchObjectArrayWith(s)}else r=this._searchLogical(e);return function(e,t){e.forEach(e=>{let s=1;e.matches.forEach(({key:e,norm:n,score:r})=>{const i=t.get(e,"weight");s*=Math.pow(0===r&&i?Number.EPSILON:r,(i||1)*n)}),e.score=s})}(r,this._keyStore),h&&r.sort(a),s(n)&&n>-1&&(r=r.slice(0,n)),function(e,t,{includeMatches:s=o.includeMatches,includeScore:n=o.includeScore}={}){const r=[];s&&r.push(d);n&&r.push(u);return e.map(e=>{const{idx:s}=e,n={item:t[s],refIndex:s};return r.length&&r.forEach(t=>{t(e,n)}),n})}(r,this._docs,{includeMatches:i,includeScore:c})}_searchStringArrayWith(e){const{records:t}=this._myIndex,s=[];return t.forEach(({v:t,i:r,n:i})=>{if(!n(t))return;const{isMatch:c,score:o,indices:h}=e.searchIn(t);c&&s.push({item:t,idx:r,matches:[{score:o,value:t,norm:i,indices:h}]})}),s}_searchLogical(e){const t=A(e,this.options),{keys:s,records:r}=this._myIndex,i={},c=[],o=(e,t,n)=>{if(!e.children){const{key:n,searcher:r}=e,i=t[s.indexOf(n)];return this._findMatches({key:n,value:i,searcher:r})}{const s=e.operator;let r=[];for(let i=0;i<e.children.length;i+=1){let c=e.children[i],h=o(c,t,n);if(h&&h.length){if(r.push({idx:n,item:t,matches:h}),s===x)break}else if(s===k){r.length=0;break}}r.length&&(i[n]||(i[n]={idx:n,item:t,matches:[]},c.push(i[n])),r.forEach(({matches:e})=>{i[n].matches.push(...e)}))}};return r.forEach(({$:e,i:s})=>{n(e)&&o(t,e,s)}),c}_searchObjectArrayWith(e){const{keys:t,records:s}=this._myIndex,r=[];return s.forEach(({$:s,i:i})=>{if(!n(s))return;let c=[];t.forEach((t,n)=>{c.push(...this._findMatches({key:t,value:s[n],searcher:e}))}),c.length&&r.push({idx:i,item:s,matches:c})}),r}_findMatches({key:t,value:s,searcher:r}){if(!n(s))return[];let i=[];if(e(s))s.forEach(({v:e,i:s,n:c})=>{if(!n(e))return;const{isMatch:o,score:h,indices:a}=r.searchIn(e);o&&i.push({score:h,key:t,value:e,idx:s,norm:c,indices:a})});else{const{v:e,n:n}=s,{isMatch:c,score:o,indices:h}=r.searchIn(e);c&&i.push({score:o,key:t,value:e,norm:n,indices:h})}return i}}w.version="6.0.0-beta.0",w.createIndex=l,w.parseIndex=function(e,{getFn:t=o.getFn}={}){const{keys:s,records:n}=e;let r=new a({getFn:t});return r.setKeys(s),r.setRecords(n),r},w.config=o;export default w;
function e(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function t(e){return"string"==typeof e}function s(e){return"number"==typeof e}function n(e){return null!=e}function r(e){return!e.trim().length}const i=Object.prototype.hasOwnProperty;class c{constructor(e){this._keys={},this._keyNames=[];let s=0;e.forEach(e=>{let n,r=1;if(t(e))n=e;else{if(!i.call(e,"name"))throw new Error("Key must contain a `name`");if(n=e.name,i.call(e,"weight")&&(r=e.weight,r<=0))throw new Error("`weight` property in key must be a positive integer")}this._keyNames.push(n),this._keys[n]={weight:r},s+=r}),this._keyNames.forEach(e=>{this._keys[e].weight/=s})}get(e,t){return this._keys[e]&&this._keys[e][t]}keys(){return this._keyNames}toJSON(){return JSON.stringify(this._keys)}}var o={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(r,i){let c=[],o=!1;const h=(r,i)=>{if(i){const a=i.indexOf(".");let l=i,d=null;-1!==a&&(l=i.slice(0,a),d=i.slice(a+1));const u=r[l];if(!n(u))return;if(d||!t(u)&&!s(u))if(e(u)){o=!0;for(let e=0,t=u.length;e<t;e+=1)h(u[e],d)}else d&&h(u,d);else c.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(u))}else c.push(r)};return h(r,i),o?c:c[0]}}};const h=/[^ ]+/g;class a{constructor({getFn:e=o.getFn}={}){this.norm=function(e=3){const t=new Map;return{get(s){const n=s.match(h).length;if(t.has(n))return t.get(n);const r=parseFloat((1/Math.sqrt(n)).toFixed(e));return t.set(n,r),r},clear(){t.clear()}}}(3),this.getFn=e,this.isCreated=!1,this.setRecords()}setCollection(e=[]){this.docs=e}setRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,t(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const s=this.size();t(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t<s;t+=1)this.records[t].i-=1}size(){return this.records.length}_addString(e,t){if(!n(e)||r(e))return;let s={v:e,i:t,n:this.norm.get(e)};this.records.push(s)}_addObject(s,i){let c={i:i,$:{}};this.keys.forEach((i,o)=>{let h=this.getFn(s,i);if(n(h))if(e(h)){let s=[];const i=[{nestedArrIndex:-1,value:h}];for(;i.length;){const{nestedArrIndex:c,value:o}=i.pop();if(n(o))if(t(o)&&!r(o)){let e={v:o,i:c,n:this.norm.get(o)};s.push(e)}else e(o)&&o.forEach((e,t)=>{i.push({nestedArrIndex:t,value:e})})}c.$[o]=s}else if(!r(h)){let e={v:h,n:this.norm.get(h)};c.$[o]=e}}),this.records.push(c)}toJSON(){return{keys:this.keys,records:this.records}}}function l(e,t,{getFn:s=o.getFn}={}){let n=new a({getFn:s});return n.setKeys(e),n.setCollection(t),n.create(),n}function d(e,t){const s=e.matches;if(t.matches=[],n(s))for(let e=0,r=s.length;e<r;e+=1){let r=s[e];if(!n(r.indices)||0===r.indices.length)continue;const{indices:i,value:c}=r;let o={indices:i,value:c};r.key&&(o.key=r.key),r.idx>-1&&(o.refIndex=r.idx),t.matches.push(o)}}function u(e,t){t.score=e.score}function f(e,{errors:t=0,currentLocation:s=0,expectedLocation:n=0,distance:r=o.distance}={}){const i=t/e.length,c=Math.abs(n-s);return r?i+c/r:c?1:i}function g(e,t,s,{location:n=o.location,distance:r=o.distance,threshold:i=o.threshold,findAllMatches:c=o.findAllMatches,minMatchCharLength:h=o.minMatchCharLength,includeMatches:a=o.includeMatches}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const l=t.length,d=e.length,u=Math.max(0,Math.min(n,d));let g=i,p=u;const m=[];if(a)for(let e=0;e<d;e+=1)m[e]=0;let y;for(;(y=e.indexOf(t,p))>-1;){let e=f(t,{currentLocation:y,expectedLocation:u,distance:r});if(g=Math.min(e,g),p=y+l,a){let e=0;for(;e<l;)m[y+e]=1,e+=1}}p=-1;let M=[],k=1,x=l+d;const _=1<<(l<=31?l-1:30);for(let n=0;n<l;n+=1){let i=0,o=x;for(;i<o;){f(t,{errors:n,currentLocation:u+o,expectedLocation:u,distance:r})<=g?i=o:x=o,o=Math.floor((x-i)/2+i)}x=o;let h=Math.max(1,u-o+1),y=c?d:Math.min(u+o,d)+l,v=Array(y+2);v[y+1]=(1<<n)-1;for(let i=y;i>=h;i-=1){let c=i-1,o=s[e.charAt(c)];if(o&&a&&(m[c]=1),v[i]=(v[i+1]<<1|1)&o,0!==n&&(v[i]|=(M[i+1]|M[i])<<1|1|M[i+1]),v[i]&_&&(k=f(t,{errors:n,currentLocation:c,expectedLocation:u,distance:r}),k<=g)){if(g=k,p=c,p<=u)break;h=Math.max(1,2*u-p)}}if(f(t,{errors:n+1,currentLocation:u,expectedLocation:u,distance:r})>g)break;M=v}let v={isMatch:p>=0,score:Math.max(.001,k)};return a&&(v.indices=function(e=[],t=o.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let c=e.length;i<c;i+=1){let c=e[i];c&&-1===n?n=i:c||-1===n||(r=i-1,r-n+1>=t&&s.push([n,r]),n=-1)}return e[i-1]&&i-n>=t&&s.push([n,i-1]),s}(m,h)),v}function p(e){let t={},s=e.length;for(let n=0;n<s;n+=1)t[e.charAt(n)]=0;for(let n=0;n<s;n+=1)t[e.charAt(n)]|=1<<s-n-1;return t}class m{constructor(e,{location:t=o.location,threshold:s=o.threshold,distance:n=o.distance,includeMatches:r=o.includeMatches,findAllMatches:i=o.findAllMatches,minMatchCharLength:c=o.minMatchCharLength,isCaseSensitive:h=o.isCaseSensitive}={}){this.options={location:t,threshold:s,distance:n,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:h},this.pattern=h?e:e.toLowerCase(),this.chunks=[];let a=0;for(;a<this.pattern.length;){let e=this.pattern.substring(a,a+32);this.chunks.push({pattern:e,alphabet:p(e)}),a+=32}}searchIn(e){const{isCaseSensitive:t,includeMatches:s}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return s&&(t.indices=[[0,e.length-1]]),t}const{location:n,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:o}=this.options;let h=[],a=0,l=!1;this.chunks.forEach(({pattern:t,alphabet:d},u)=>{const{isMatch:f,score:p,indices:m}=g(e,t,d,{location:n+32*u,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:o,includeMatches:s});f&&(l=!0),a+=p,f&&m&&(h=[...h,...m])});let d={isMatch:l,score:l?a/this.chunks.length:1};return l&&s&&(d.indices=h),d}}const y=[];function M(e,t){for(let s=0,n=y.length;s<n;s+=1){let n=y[s];if(n.condition(e,t))return new n(e,t)}return new m(e,t)}const k="$and",x="$or",_=e=>!(!e[k]&&!e[x]),v=e=>({[k]:Object.keys(e).map(t=>({[t]:e[t]}))});function L(s,n,{auto:r=!0}={}){const i=s=>{let c=Object.keys(s);if(c.length>1&&!_(s))return i(v(s));let o=c[0];if((t=>!e(t)&&"object"==typeof t&&!_(t))(s)){const e=s[o];if(!t(e))throw new Error(`Invalid value for key "${o}"`);const i={key:o,pattern:e};return r&&(i.searcher=M(e,n)),i}let h={children:[],operator:o};return c.forEach(t=>{const n=s[t];e(n)&&n.forEach(e=>{h.children.push(i(e))})}),h};return _(s)||(s=v(s)),i(s)}class w{constructor(e,t={},s){this.options={...o,...t},this._keyStore=new c(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof a))throw new Error("Incorrect `index` type");this._myIndex=t||l(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}add(e){n(e)&&(this._docs.push(e),this._myIndex.add(e))}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:c,sortFn:h}=this.options;let a=t(e)?t(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,t){e.forEach(e=>{let s=1;e.matches.forEach(({key:e,norm:n,score:r})=>{const i=t.get(e,"weight");s*=Math.pow(0===r&&i?Number.EPSILON:r,(i||1)*n)}),e.score=s})}(a,this._keyStore),c&&a.sort(h),s(n)&&n>-1&&(a=a.slice(0,n)),function(e,t,{includeMatches:s=o.includeMatches,includeScore:n=o.includeScore}={}){const r=[];s&&r.push(d);n&&r.push(u);return e.map(e=>{const{idx:s}=e,n={item:t[s],refIndex:s};return r.length&&r.forEach(t=>{t(e,n)}),n})}(a,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const t=M(e,this.options),{records:s}=this._myIndex,r=[];return s.forEach(({v:e,i:s,n:i})=>{if(!n(e))return;const{isMatch:c,score:o,indices:h}=t.searchIn(e);c&&r.push({item:e,idx:s,matches:[{score:o,value:e,norm:i,indices:h}]})}),r}_searchLogical(e){const t=L(e,this.options),{keys:s,records:r}=this._myIndex,i={},c=[],o=(e,t,n)=>{if(!e.children){const{key:n,searcher:r}=e,i=t[s.indexOf(n)];return this._findMatches({key:n,value:i,searcher:r})}{const s=e.operator;let r=[];for(let i=0;i<e.children.length;i+=1){let c=e.children[i],h=o(c,t,n);if(h&&h.length){if(r.push({idx:n,item:t,matches:h}),s===x)break}else if(s===k){r.length=0;break}}r.length&&(i[n]||(i[n]={idx:n,item:t,matches:[]},c.push(i[n])),r.forEach(({matches:e})=>{i[n].matches.push(...e)}))}};return r.forEach(({$:e,i:s})=>{n(e)&&o(t,e,s)}),c}_searchObjectList(e){const t=M(e,this.options),{keys:s,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!n(e))return;let c=[];s.forEach((s,n)=>{c.push(...this._findMatches({key:s,value:e[n],searcher:t}))}),c.length&&i.push({idx:r,item:e,matches:c})}),i}_findMatches({key:t,value:s,searcher:r}){if(!n(s))return[];let i=[];if(e(s))s.forEach(({v:e,i:s,n:c})=>{if(!n(e))return;const{isMatch:o,score:h,indices:a}=r.searchIn(e);o&&i.push({score:h,key:t,value:e,idx:s,norm:c,indices:a})});else{const{v:e,n:n}=s,{isMatch:c,score:o,indices:h}=r.searchIn(e);c&&i.push({score:o,key:t,value:e,norm:n,indices:h})}return i}}w.version="6.0.0-beta.1",w.createIndex=l,w.parseIndex=function(e,{getFn:t=o.getFn}={}){const{keys:s,records:n}=e;let r=new a({getFn:t});return r.setKeys(s),r.setRecords(n),r},w.config=o;export default w;
/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -189,3 +189,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

if (!hasOwn.call(key, 'name')) {
throw new Error('Key must contain a name');
throw new Error('Key must contain a `name`');
}

@@ -199,3 +199,3 @@

if (weight <= 0) {
throw new Error('"weight" property in key must be a positive integer');
throw new Error('`weight` property in key must be a positive integer');
}

@@ -242,5 +242,5 @@ }

var _get = function _get(obj, path) {
var deepGet = function deepGet(obj, path) {
if (!path) {
// If there's no path left, we've gotten to the object we care about.
// If there's no path left, we've arrived at the object we care about.
list.push(obj);

@@ -259,15 +259,17 @@ } else {

if (isDefined(value)) {
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
if (!isDefined(value)) {
return;
}
for (var i = 0, len = value.length; i < len; i += 1) {
_get(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
_get(value, remaining);
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
for (var i = 0, len = value.length; i < len; i += 1) {
deepGet(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
deepGet(value, remaining);
}

@@ -277,9 +279,4 @@ }

_get(obj, path);
if (arr) {
return list;
}
return list[0];
deepGet(obj, path);
return arr ? list : list[0];
}

@@ -1062,3 +1059,3 @@

if (index && !(index instanceof FuseIndex)) {
throw new Error('Incorrect index type');
throw new Error('Incorrect `index` type');
}

@@ -1100,3 +1097,2 @@

var results = [];
var _this$options = this.options,

@@ -1107,10 +1103,3 @@ includeMatches = _this$options.includeMatches,

sortFn = _this$options.sortFn;
if (isString(query)) {
var searcher = createSearcher(query, this.options);
results = isString(this._docs[0]) ? this._searchStringArrayWith(searcher) : this._searchObjectArrayWith(searcher);
} else {
results = this._searchLogical(query);
}
var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, this._keyStore);

@@ -1132,4 +1121,5 @@

}, {
key: "_searchStringArrayWith",
value: function _searchStringArrayWith(searcher) {
key: "_searchStringList",
value: function _searchStringList(query) {
var searcher = createSearcher(query, this.options);
var records = this._myIndex.records;

@@ -1248,6 +1238,7 @@ var results = []; // Iterate over every string in the index

}, {
key: "_searchObjectArrayWith",
value: function _searchObjectArrayWith(searcher) {
key: "_searchObjectList",
value: function _searchObjectList(query) {
var _this2 = this;
var searcher = createSearcher(query, this.options);
var _this$_myIndex2 = this._myIndex,

@@ -1393,3 +1384,3 @@ keys = _this$_myIndex2.keys,

Fuse.version = '6.0.0-beta.0';
Fuse.version = '6.0.0-beta.1';
Fuse.createIndex = createIndex;

@@ -1396,0 +1387,0 @@ Fuse.parseIndex = parseIndex;

/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function u(e){return"string"==typeof e}function f(e){return"number"==typeof e}function l(e){return null!=e}function d(e){return!e.trim().length}var v=Object.prototype.hasOwnProperty,y=function(){function e(n){var r=this;t(this,e),this._keys={},this._keyNames=[];var i=0;n.forEach((function(e){var t,n=1;if(u(e))t=e;else{if(!v.call(e,"name"))throw new Error("Key must contain a name");if(t=e.name,v.call(e,"weight")&&(n=e.weight)<=0)throw new Error('"weight" property in key must be a positive integer')}r._keyNames.push(t),r._keys[t]={weight:n},i+=n})),this._keyNames.forEach((function(e){r._keys[e].weight/=i}))}return r(e,[{key:"get",value:function(e,t){return this._keys[e]&&this._keys[e][t]}},{key:"keys",value:function(){return this._keyNames}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}(),p=a({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i){if(i){var o=i.indexOf("."),a=i,c=null;-1!==o&&(a=i.slice(0,o),c=i.slice(o+1));var s=t[a];if(l(s))if(c||!u(s)&&!f(s))if(h(s)){r=!0;for(var d=0,v=s.length;d<v;d+=1)e(s[d],c)}else c&&e(s,c);else n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(s))}else n.push(t)}(e,t),r?n:n[0]}}),g=/[^ ]+/g;function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map;return{get:function(n){var r=n.match(g).length;if(t.has(r))return t.get(r);var i=parseFloat((1/Math.sqrt(r)).toFixed(e));return t.set(r,i),i},clear:function(){t.clear()}}}var k=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?p.getFn:r;t(this,e),this.norm=m(3),this.getFn=i,this.isCreated=!1,this.setRecords()}return r(e,[{key:"setCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=e}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,u(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();u(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(l(e)&&!d(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var o=n.getFn(e,t);if(l(o))if(h(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var a=t.pop(),c=a.nestedArrIndex,s=a.value;if(l(s))if(u(s)&&!d(s)){var f={v:s,i:c,n:n.norm.get(s)};e.push(f)}else h(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!d(o)){var a={v:o,n:n.norm.get(o)};r.$[i]=a}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function b(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?p.getFn:r,o=new k({getFn:i});return o.setKeys(e),o.setCollection(t),o.create(),o}function M(e,t){var n=e.matches;if(t.matches=[],l(n))for(var r=0,i=n.length;r<i;r+=1){var o=n[r];if(l(o.indices)&&0!==o.indices.length){var a={indices:o.indices,value:o.value};o.key&&(a.key=o.key),o.idx>-1&&(a.refIndex=o.idx),t.matches.push(a)}}}function x(e,t){t.score=e.score}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,c=void 0===a?0:a,s=t.distance,h=void 0===s?p.distance:s,u=r/e.length,f=Math.abs(c-o);return h?u+f/h:f?1:u}function w(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=e.length;o<a;o+=1){var c=e[o];c&&-1===r?r=o:c||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function O(e){for(var t={},n=e.length,r=0;r<n;r+=1)t[e.charAt(r)]=0;for(var i=0;i<n;i+=1)t[e.charAt(i)]|=1<<n-i-1;return t}var S=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,o=void 0===i?p.location:i,a=r.threshold,c=void 0===a?p.threshold:a,s=r.distance,h=void 0===s?p.distance:s,u=r.includeMatches,f=void 0===u?p.includeMatches:u,l=r.findAllMatches,d=void 0===l?p.findAllMatches:l,v=r.minMatchCharLength,y=void 0===v?p.minMatchCharLength:v,g=r.isCaseSensitive,m=void 0===g?p.isCaseSensitive:g;t(this,e),this.options={location:o,threshold:c,distance:h,includeMatches:f,findAllMatches:d,minMatchCharLength:y,isCaseSensitive:m},this.pattern=m?n:n.toLowerCase(),this.chunks=[];for(var k=0;k<this.pattern.length;){var b=this.pattern.substring(k,k+32);this.chunks.push({pattern:b,alphabet:O(b)}),k+=32}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,a=o.location,s=o.distance,h=o.threshold,u=o.findAllMatches,f=o.minMatchCharLength,l=[],d=0,v=!1;this.chunks.forEach((function(t,n){var i=t.pattern,o=t.alphabet,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?p.location:i,a=r.distance,c=void 0===a?p.distance:a,s=r.threshold,h=void 0===s?p.threshold:s,u=r.findAllMatches,f=void 0===u?p.findAllMatches:u,l=r.minMatchCharLength,d=void 0===l?p.minMatchCharLength:l,v=r.includeMatches,y=void 0===v?p.includeMatches:v;if(t.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));var g,m=t.length,k=e.length,b=Math.max(0,Math.min(o,k)),M=h,x=b,O=[];if(y)for(var S=0;S<k;S+=1)O[S]=0;for(;(g=e.indexOf(t,x))>-1;){var A=_(t,{currentLocation:g,expectedLocation:b,distance:c});if(M=Math.min(A,M),x=g+m,y)for(var j=0;j<m;)O[g+j]=1,j+=1}x=-1;for(var E=[],C=1,I=m+k,L=1<<(m<=31?m-1:30),F=0;F<m;F+=1){for(var P=0,N=I;P<N;){var $=_(t,{errors:F,currentLocation:b+N,expectedLocation:b,distance:c});$<=M?P=N:I=N,N=Math.floor((I-P)/2+P)}I=N;var D=Math.max(1,b-N+1),K=f?k:Math.min(b+N,k)+m,W=Array(K+2);W[K+1]=(1<<F)-1;for(var z=K;z>=D;z-=1){var J=z-1,R=n[e.charAt(J)];if(R&&y&&(O[J]=1),W[z]=(W[z+1]<<1|1)&R,0!==F&&(W[z]|=(E[z+1]|E[z])<<1|1|E[z+1]),W[z]&L&&(C=_(t,{errors:F,currentLocation:J,expectedLocation:b,distance:c}))<=M){if(M=C,(x=J)<=b)break;D=Math.max(1,2*b-x)}}var T=_(t,{errors:F+1,currentLocation:b,expectedLocation:b,distance:c});if(T>M)break;E=W}var q={isMatch:x>=0,score:Math.max(.001,C)};return y&&(q.indices=w(O,d)),q}(e,i,o,{location:a+32*n,distance:s,threshold:h,findAllMatches:u,minMatchCharLength:f,includeMatches:r}),g=y.isMatch,m=y.score,k=y.indices;g&&(v=!0),d+=m,g&&k&&(l=[].concat(c(l),c(k)))}));var y={isMatch:v,score:v?d/this.chunks.length:1};return v&&r&&(y.indices=l),y}}]),e}(),A=[];function j(e,t){for(var n=0,r=A.length;n<r;n+=1){var i=A[n];if(i.condition(e,t))return new i(e,t)}return new S(e,t)}var E="$and",C="$or",I=function(e){return!(!e[E]&&!e[C])},L=function(t){return!h(t)&&"object"===e(t)&&!I(t)},F=function(e){return i({},E,Object.keys(e).map((function(t){return i({},t,e[t])})))},P=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=a({},p,{},r),this._keyStore=new y(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof k))throw new Error("Incorrect index type");this._myIndex=t||b(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=[],o=this.options,a=o.includeMatches,c=o.includeScore,s=o.shouldSort,h=o.sortFn;if(u(e)){var l=j(e,this.options);i=u(this._docs[0])?this._searchStringArrayWith(l):this._searchObjectArrayWith(l)}else i=this._searchLogical(e);return N(i,this._keyStore),s&&i.sort(h),f(r)&&r>-1&&(i=i.slice(0,r)),$(i,this._docs,{includeMatches:a,includeScore:c})}},{key:"_searchStringArrayWith",value:function(e){var t=this._myIndex.records,n=[];return t.forEach((function(t){var r=t.v,i=t.i,o=t.n;if(l(r)){var a=e.searchIn(r),c=a.isMatch,s=a.score,h=a.indices;c&&n.push({item:r,idx:i,matches:[{score:s,value:r,norm:o,indices:h}]})}})),n}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n);if(r.length>1&&!I(n))return e(F(n));var o=r[0];if(L(n)){var a=n[o];if(!u(a))throw new Error('Invalid value for key "'.concat(o,'"'));var c={key:o,pattern:a};return i&&(c.searcher=j(a,t)),c}var s={children:[],operator:o};return r.forEach((function(t){var r=n[t];h(r)&&r.forEach((function(t){s.children.push(e(t))}))})),s};return I(e)||(e=F(e)),o(e)}(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a={},s=[];return o.forEach((function(e){var r=e.$,o=e.i;l(r)&&function e(n,r,o){if(!n.children){var h=n.key,u=n.searcher,f=r[i.indexOf(h)];return t._findMatches({key:h,value:f,searcher:u})}for(var l=n.operator,d=[],v=0;v<n.children.length;v+=1){var y=e(n.children[v],r,o);if(y&&y.length){if(d.push({idx:o,item:r,matches:y}),l===C)break}else if(l===E){d.length=0;break}}d.length&&(a[o]||(a[o]={idx:o,item:r,matches:[]},s.push(a[o])),d.forEach((function(e){var t,n=e.matches;(t=a[o].matches).push.apply(t,c(n))})))}(n,r,o)})),s}},{key:"_searchObjectArrayWith",value:function(e){var t=this,n=this._myIndex,r=n.keys,i=n.records,o=[];return i.forEach((function(n){var i=n.$,a=n.i;if(l(i)){var s=[];r.forEach((function(n,r){s.push.apply(s,c(t._findMatches({key:n,value:i[r],searcher:e})))})),s.length&&o.push({idx:a,item:i,matches:s})}})),o}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!l(n))return[];var i=[];if(h(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(l(n)){var c=r.searchIn(n),s=c.isMatch,h=c.score,u=c.indices;s&&i.push({score:h,key:t,value:n,idx:o,norm:a,indices:u})}}));else{var o=n.v,a=n.n,c=r.searchIn(o),s=c.isMatch,u=c.score,f=c.indices;s&&i.push({score:u,key:t,value:o,norm:a,indices:f})}return i}}]),e}();function N(e,t){e.forEach((function(e){var n=1;e.matches.forEach((function(e){var r=e.key,i=e.norm,o=e.score,a=t.get(r,"weight");n*=Math.pow(0===o&&a?Number.EPSILON:o,(a||1)*i)})),e.score=n}))}function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?p.includeMatches:r,o=n.includeScore,a=void 0===o?p.includeScore:o,c=[];return i&&c.push(M),a&&c.push(x),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}return P.version="6.0.0-beta.0",P.createIndex=b,P.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?p.getFn:n,i=e.keys,o=e.records,a=new k({getFn:r});return a.setKeys(i),a.setRecords(o),a},P.config=p,P},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();
var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function u(e){return"string"==typeof e}function f(e){return"number"==typeof e}function l(e){return null!=e}function d(e){return!e.trim().length}var v=Object.prototype.hasOwnProperty,y=function(){function e(n){var r=this;t(this,e),this._keys={},this._keyNames=[];var i=0;n.forEach((function(e){var t,n=1;if(u(e))t=e;else{if(!v.call(e,"name"))throw new Error("Key must contain a `name`");if(t=e.name,v.call(e,"weight")&&(n=e.weight)<=0)throw new Error("`weight` property in key must be a positive integer")}r._keyNames.push(t),r._keys[t]={weight:n},i+=n})),this._keyNames.forEach((function(e){r._keys[e].weight/=i}))}return r(e,[{key:"get",value:function(e,t){return this._keys[e]&&this._keys[e][t]}},{key:"keys",value:function(){return this._keyNames}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}(),p=a({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i){if(i){var o=i.indexOf("."),a=i,c=null;-1!==o&&(a=i.slice(0,o),c=i.slice(o+1));var s=t[a];if(!l(s))return;if(c||!u(s)&&!f(s))if(h(s)){r=!0;for(var d=0,v=s.length;d<v;d+=1)e(s[d],c)}else c&&e(s,c);else n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(s))}else n.push(t)}(e,t),r?n:n[0]}}),g=/[^ ]+/g;function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map;return{get:function(n){var r=n.match(g).length;if(t.has(r))return t.get(r);var i=parseFloat((1/Math.sqrt(r)).toFixed(e));return t.set(r,i),i},clear:function(){t.clear()}}}var k=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?p.getFn:r;t(this,e),this.norm=m(3),this.getFn=i,this.isCreated=!1,this.setRecords()}return r(e,[{key:"setCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=e}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,u(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();u(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(l(e)&&!d(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var o=n.getFn(e,t);if(l(o))if(h(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var a=t.pop(),c=a.nestedArrIndex,s=a.value;if(l(s))if(u(s)&&!d(s)){var f={v:s,i:c,n:n.norm.get(s)};e.push(f)}else h(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!d(o)){var a={v:o,n:n.norm.get(o)};r.$[i]=a}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function b(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?p.getFn:r,o=new k({getFn:i});return o.setKeys(e),o.setCollection(t),o.create(),o}function M(e,t){var n=e.matches;if(t.matches=[],l(n))for(var r=0,i=n.length;r<i;r+=1){var o=n[r];if(l(o.indices)&&0!==o.indices.length){var a={indices:o.indices,value:o.value};o.key&&(a.key=o.key),o.idx>-1&&(a.refIndex=o.idx),t.matches.push(a)}}}function x(e,t){t.score=e.score}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,a=t.expectedLocation,c=void 0===a?0:a,s=t.distance,h=void 0===s?p.distance:s,u=r/e.length,f=Math.abs(c-o);return h?u+f/h:f?1:u}function w(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.minMatchCharLength,n=[],r=-1,i=-1,o=0,a=e.length;o<a;o+=1){var c=e[o];c&&-1===r?r=o:c||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function O(e){for(var t={},n=e.length,r=0;r<n;r+=1)t[e.charAt(r)]=0;for(var i=0;i<n;i+=1)t[e.charAt(i)]|=1<<n-i-1;return t}var S=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,o=void 0===i?p.location:i,a=r.threshold,c=void 0===a?p.threshold:a,s=r.distance,h=void 0===s?p.distance:s,u=r.includeMatches,f=void 0===u?p.includeMatches:u,l=r.findAllMatches,d=void 0===l?p.findAllMatches:l,v=r.minMatchCharLength,y=void 0===v?p.minMatchCharLength:v,g=r.isCaseSensitive,m=void 0===g?p.isCaseSensitive:g;t(this,e),this.options={location:o,threshold:c,distance:h,includeMatches:f,findAllMatches:d,minMatchCharLength:y,isCaseSensitive:m},this.pattern=m?n:n.toLowerCase(),this.chunks=[];for(var k=0;k<this.pattern.length;){var b=this.pattern.substring(k,k+32);this.chunks.push({pattern:b,alphabet:O(b)}),k+=32}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,a=o.location,s=o.distance,h=o.threshold,u=o.findAllMatches,f=o.minMatchCharLength,l=[],d=0,v=!1;this.chunks.forEach((function(t,n){var i=t.pattern,o=t.alphabet,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?p.location:i,a=r.distance,c=void 0===a?p.distance:a,s=r.threshold,h=void 0===s?p.threshold:s,u=r.findAllMatches,f=void 0===u?p.findAllMatches:u,l=r.minMatchCharLength,d=void 0===l?p.minMatchCharLength:l,v=r.includeMatches,y=void 0===v?p.includeMatches:v;if(t.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));var g,m=t.length,k=e.length,b=Math.max(0,Math.min(o,k)),M=h,x=b,O=[];if(y)for(var S=0;S<k;S+=1)O[S]=0;for(;(g=e.indexOf(t,x))>-1;){var A=_(t,{currentLocation:g,expectedLocation:b,distance:c});if(M=Math.min(A,M),x=g+m,y)for(var j=0;j<m;)O[g+j]=1,j+=1}x=-1;for(var E=[],L=1,C=m+k,I=1<<(m<=31?m-1:30),F=0;F<m;F+=1){for(var P=0,N=C;P<N;){var $=_(t,{errors:F,currentLocation:b+N,expectedLocation:b,distance:c});$<=M?P=N:C=N,N=Math.floor((C-P)/2+P)}C=N;var D=Math.max(1,b-N+1),K=f?k:Math.min(b+N,k)+m,z=Array(K+2);z[K+1]=(1<<F)-1;for(var J=K;J>=D;J-=1){var R=J-1,T=n[e.charAt(R)];if(T&&y&&(O[R]=1),z[J]=(z[J+1]<<1|1)&T,0!==F&&(z[J]|=(E[J+1]|E[J])<<1|1|E[J+1]),z[J]&I&&(L=_(t,{errors:F,currentLocation:R,expectedLocation:b,distance:c}))<=M){if(M=L,(x=R)<=b)break;D=Math.max(1,2*b-x)}}var q=_(t,{errors:F+1,currentLocation:b,expectedLocation:b,distance:c});if(q>M)break;E=z}var U={isMatch:x>=0,score:Math.max(.001,L)};return y&&(U.indices=w(O,d)),U}(e,i,o,{location:a+32*n,distance:s,threshold:h,findAllMatches:u,minMatchCharLength:f,includeMatches:r}),g=y.isMatch,m=y.score,k=y.indices;g&&(v=!0),d+=m,g&&k&&(l=[].concat(c(l),c(k)))}));var y={isMatch:v,score:v?d/this.chunks.length:1};return v&&r&&(y.indices=l),y}}]),e}(),A=[];function j(e,t){for(var n=0,r=A.length;n<r;n+=1){var i=A[n];if(i.condition(e,t))return new i(e,t)}return new S(e,t)}var E="$and",L="$or",C=function(e){return!(!e[E]&&!e[L])},I=function(t){return!h(t)&&"object"===e(t)&&!C(t)},F=function(e){return i({},E,Object.keys(e).map((function(t){return i({},t,e[t])})))},P=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=a({},p,{},r),this._keyStore=new y(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof k))throw new Error("Incorrect `index` type");this._myIndex=t||b(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,a=i.includeScore,c=i.shouldSort,s=i.sortFn,h=u(e)?u(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return N(h,this._keyStore),c&&h.sort(s),f(r)&&r>-1&&(h=h.slice(0,r)),$(h,this._docs,{includeMatches:o,includeScore:a})}},{key:"_searchStringList",value:function(e){var t=j(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(l(n)){var a=t.searchIn(n),c=a.isMatch,s=a.score,h=a.indices;c&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:h}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n);if(r.length>1&&!C(n))return e(F(n));var o=r[0];if(I(n)){var a=n[o];if(!u(a))throw new Error('Invalid value for key "'.concat(o,'"'));var c={key:o,pattern:a};return i&&(c.searcher=j(a,t)),c}var s={children:[],operator:o};return r.forEach((function(t){var r=n[t];h(r)&&r.forEach((function(t){s.children.push(e(t))}))})),s};return C(e)||(e=F(e)),o(e)}(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a={},s=[];return o.forEach((function(e){var r=e.$,o=e.i;l(r)&&function e(n,r,o){if(!n.children){var h=n.key,u=n.searcher,f=r[i.indexOf(h)];return t._findMatches({key:h,value:f,searcher:u})}for(var l=n.operator,d=[],v=0;v<n.children.length;v+=1){var y=e(n.children[v],r,o);if(y&&y.length){if(d.push({idx:o,item:r,matches:y}),l===L)break}else if(l===E){d.length=0;break}}d.length&&(a[o]||(a[o]={idx:o,item:r,matches:[]},s.push(a[o])),d.forEach((function(e){var t,n=e.matches;(t=a[o].matches).push.apply(t,c(n))})))}(n,r,o)})),s}},{key:"_searchObjectList",value:function(e){var t=this,n=j(e,this.options),r=this._myIndex,i=r.keys,o=r.records,a=[];return o.forEach((function(e){var r=e.$,o=e.i;if(l(r)){var s=[];i.forEach((function(e,i){s.push.apply(s,c(t._findMatches({key:e,value:r[i],searcher:n})))})),s.length&&a.push({idx:o,item:r,matches:s})}})),a}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!l(n))return[];var i=[];if(h(n))n.forEach((function(e){var n=e.v,o=e.i,a=e.n;if(l(n)){var c=r.searchIn(n),s=c.isMatch,h=c.score,u=c.indices;s&&i.push({score:h,key:t,value:n,idx:o,norm:a,indices:u})}}));else{var o=n.v,a=n.n,c=r.searchIn(o),s=c.isMatch,u=c.score,f=c.indices;s&&i.push({score:u,key:t,value:o,norm:a,indices:f})}return i}}]),e}();function N(e,t){e.forEach((function(e){var n=1;e.matches.forEach((function(e){var r=e.key,i=e.norm,o=e.score,a=t.get(r,"weight");n*=Math.pow(0===o&&a?Number.EPSILON:o,(a||1)*i)})),e.score=n}))}function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?p.includeMatches:r,o=n.includeScore,a=void 0===o?p.includeScore:o,c=[];return i&&c.push(M),a&&c.push(x),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}return P.version="6.0.0-beta.1",P.createIndex=b,P.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?p.getFn:n,i=e.keys,o=e.records,a=new k({getFn:r});return a.setKeys(i),a.setRecords(o),a},P.config=p,P},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();
/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -262,3 +262,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

if (!hasOwn.call(key, 'name')) {
throw new Error('Key must contain a name');
throw new Error('Key must contain a `name`');
}

@@ -272,3 +272,3 @@

if (weight <= 0) {
throw new Error('"weight" property in key must be a positive integer');
throw new Error('`weight` property in key must be a positive integer');
}

@@ -315,5 +315,5 @@ }

var _get = function _get(obj, path) {
var deepGet = function deepGet(obj, path) {
if (!path) {
// If there's no path left, we've gotten to the object we care about.
// If there's no path left, we've arrived at the object we care about.
list.push(obj);

@@ -332,15 +332,17 @@ } else {

if (isDefined(value)) {
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
if (!isDefined(value)) {
return;
}
for (var i = 0, len = value.length; i < len; i += 1) {
_get(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
_get(value, remaining);
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
for (var i = 0, len = value.length; i < len; i += 1) {
deepGet(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
deepGet(value, remaining);
}

@@ -350,9 +352,4 @@ }

_get(obj, path);
if (arr) {
return list;
}
return list[0];
deepGet(obj, path);
return arr ? list : list[0];
}

@@ -1697,3 +1694,3 @@

if (index && !(index instanceof FuseIndex)) {
throw new Error('Incorrect index type');
throw new Error('Incorrect `index` type');
}

@@ -1735,3 +1732,2 @@

var results = [];
var _this$options = this.options,

@@ -1742,10 +1738,3 @@ includeMatches = _this$options.includeMatches,

sortFn = _this$options.sortFn;
if (isString(query)) {
var searcher = createSearcher(query, this.options);
results = isString(this._docs[0]) ? this._searchStringArrayWith(searcher) : this._searchObjectArrayWith(searcher);
} else {
results = this._searchLogical(query);
}
var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, this._keyStore);

@@ -1767,4 +1756,5 @@

}, {
key: "_searchStringArrayWith",
value: function _searchStringArrayWith(searcher) {
key: "_searchStringList",
value: function _searchStringList(query) {
var searcher = createSearcher(query, this.options);
var records = this._myIndex.records;

@@ -1883,6 +1873,7 @@ var results = []; // Iterate over every string in the index

}, {
key: "_searchObjectArrayWith",
value: function _searchObjectArrayWith(searcher) {
key: "_searchObjectList",
value: function _searchObjectList(query) {
var _this2 = this;
var searcher = createSearcher(query, this.options);
var _this$_myIndex2 = this._myIndex,

@@ -2028,3 +2019,3 @@ keys = _this$_myIndex2.keys,

Fuse.version = '6.0.0-beta.0';
Fuse.version = '6.0.0-beta.1';
Fuse.createIndex = createIndex;

@@ -2031,0 +2022,0 @@ Fuse.parseIndex = parseIndex;

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

// Type definitions for Fuse.js v6.0.0-beta.0
// Type definitions for Fuse.js v6.0.0-beta.1
// TypeScript v3.8.3

@@ -3,0 +3,0 @@

/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -69,3 +69,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

if (!hasOwn.call(key, 'name')) {
throw new Error('Key must contain a name')
throw new Error('Key must contain a `name`')
}

@@ -79,3 +79,3 @@ keyName = key.name;

throw new Error(
'"weight" property in key must be a positive integer'
'`weight` property in key must be a positive integer'
)

@@ -113,5 +113,5 @@ }

const _get = (obj, path) => {
const deepGet = (obj, path) => {
if (!path) {
// If there's no path left, we've gotten to the object we care about.
// If there's no path left, we've arrived at the object we care about.
list.push(obj);

@@ -131,15 +131,17 @@ } else {

if (isDefined(value)) {
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true;
// Search each item in the array.
for (let i = 0, len = value.length; i < len; i += 1) {
_get(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
_get(value, remaining);
if (!isDefined(value)) {
return
}
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true;
// Search each item in the array.
for (let i = 0, len = value.length; i < len; i += 1) {
deepGet(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
deepGet(value, remaining);
}

@@ -149,9 +151,5 @@ }

_get(obj, path);
deepGet(obj, path);
if (arr) {
return list
}
return list[0]
return arr ? list : list[0]
}

@@ -1296,2 +1294,3 @@

this._keyStore = new KeyStore(this.options.keys);
this.setCollection(docs, index);

@@ -1304,3 +1303,3 @@ }

if (index && !(index instanceof FuseIndex)) {
throw new Error('Incorrect index type')
throw new Error('Incorrect `index` type')
}

@@ -1334,16 +1333,10 @@

search(query, { limit = -1 } = {}) {
let results = [];
const { includeMatches, includeScore, shouldSort, sortFn } = this.options;
if (isString(query)) {
const searcher = createSearcher(query, this.options);
let results = isString(query)
? isString(this._docs[0])
? this._searchStringList(query)
: this._searchObjectList(query)
: this._searchLogical(query);
results = isString(this._docs[0])
? this._searchStringArrayWith(searcher)
: this._searchObjectArrayWith(searcher);
} else {
results = this._searchLogical(query);
}
computeScore$1(results, this._keyStore);

@@ -1365,3 +1358,4 @@

_searchStringArrayWith(searcher) {
_searchStringList(query) {
const searcher = createSearcher(query, this.options);
const { records } = this._myIndex;

@@ -1453,3 +1447,4 @@ const results = [];

_searchObjectArrayWith(searcher) {
_searchObjectList(query) {
const searcher = createSearcher(query, this.options);
const { keys, records } = this._myIndex;

@@ -1577,3 +1572,3 @@ const results = [];

Fuse.version = '6.0.0-beta.0';
Fuse.version = '6.0.0-beta.1';
Fuse.createIndex = createIndex;

@@ -1580,0 +1575,0 @@ Fuse.parseIndex = parseIndex;

/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
function t(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function e(t){return"string"==typeof t}function s(t){return"number"==typeof t}function n(t){return null!=t}function r(t){return!t.trim().length}const i=Object.prototype.hasOwnProperty;class c{constructor(t){this._keys={},this._keyNames=[];let s=0;t.forEach(t=>{let n,r=1;if(e(t))n=t;else{if(!i.call(t,"name"))throw new Error("Key must contain a name");if(n=t.name,i.call(t,"weight")&&(r=t.weight,r<=0))throw new Error('"weight" property in key must be a positive integer')}this._keyNames.push(n),this._keys[n]={weight:r},s+=r}),this._keyNames.forEach(t=>{this._keys[t].weight/=s})}get(t,e){return this._keys[t]&&this._keys[t][e]}keys(){return this._keyNames}toJSON(){return JSON.stringify(this._keys)}}var h={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(r,i){let c=[],h=!1;const o=(r,i)=>{if(i){const a=i.indexOf(".");let l=i,u=null;-1!==a&&(l=i.slice(0,a),u=i.slice(a+1));const d=r[l];if(n(d))if(u||!e(d)&&!s(d))if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)o(d[t],u)}else u&&o(d,u);else c.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(d))}else c.push(r)};return o(r,i),h?c:c[0]}}};const o=/[^ ]+/g;class a{constructor({getFn:t=h.getFn}={}){this.norm=function(t=3){const e=new Map;return{get(s){const n=s.match(o).length;if(e.has(n))return e.get(n);const r=parseFloat((1/Math.sqrt(n)).toFixed(t));return e.set(n,r),r},clear(){e.clear()}}}(3),this.getFn=t,this.isCreated=!1,this.setRecords()}setCollection(t=[]){this.docs=t}setRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,e(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const s=this.size();e(t)?this._addString(t,s):this._addObject(t,s)}removeAt(t){this.records.splice(t,1);for(let e=t,s=this.size();e<s;e+=1)this.records[e].i-=1}size(){return this.records.length}_addString(t,e){if(!n(t)||r(t))return;let s={v:t,i:e,n:this.norm.get(t)};this.records.push(s)}_addObject(s,i){let c={i:i,$:{}};this.keys.forEach((i,h)=>{let o=this.getFn(s,i);if(n(o))if(t(o)){let s=[];const i=[{nestedArrIndex:-1,value:o}];for(;i.length;){const{nestedArrIndex:c,value:h}=i.pop();if(n(h))if(e(h)&&!r(h)){let t={v:h,i:c,n:this.norm.get(h)};s.push(t)}else t(h)&&h.forEach((t,e)=>{i.push({nestedArrIndex:e,value:t})})}c.$[h]=s}else if(!r(o)){let t={v:o,n:this.norm.get(o)};c.$[h]=t}}),this.records.push(c)}toJSON(){return{keys:this.keys,records:this.records}}}function l(t,e,{getFn:s=h.getFn}={}){let n=new a({getFn:s});return n.setKeys(t),n.setCollection(e),n.create(),n}function u(t,e){const s=t.matches;if(e.matches=[],n(s))for(let t=0,r=s.length;t<r;t+=1){let r=s[t];if(!n(r.indices)||0===r.indices.length)continue;const{indices:i,value:c}=r;let h={indices:i,value:c};r.key&&(h.key=r.key),r.idx>-1&&(h.refIndex=r.idx),e.matches.push(h)}}function d(t,e){e.score=t.score}function f(t,{errors:e=0,currentLocation:s=0,expectedLocation:n=0,distance:r=h.distance}={}){const i=e/t.length,c=Math.abs(n-s);return r?i+c/r:c?1:i}function g(t,e,s,{location:n=h.location,distance:r=h.distance,threshold:i=h.threshold,findAllMatches:c=h.findAllMatches,minMatchCharLength:o=h.minMatchCharLength,includeMatches:a=h.includeMatches}={}){if(e.length>32)throw new Error("Pattern length exceeds max of 32.");const l=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let g=i,p=d;const M=[];if(a)for(let t=0;t<u;t+=1)M[t]=0;let m;for(;(m=t.indexOf(e,p))>-1;){let t=f(e,{currentLocation:m,expectedLocation:d,distance:r});if(g=Math.min(t,g),p=m+l,a){let t=0;for(;t<l;)M[m+t]=1,t+=1}}p=-1;let y=[],x=1,k=l+u;const _=1<<(l<=31?l-1:30);for(let n=0;n<l;n+=1){let i=0,h=k;for(;i<h;){f(e,{errors:n,currentLocation:d+h,expectedLocation:d,distance:r})<=g?i=h:k=h,h=Math.floor((k-i)/2+i)}k=h;let o=Math.max(1,d-h+1),m=c?u:Math.min(d+h,u)+l,v=Array(m+2);v[m+1]=(1<<n)-1;for(let i=m;i>=o;i-=1){let c=i-1,h=s[t.charAt(c)];if(h&&a&&(M[c]=1),v[i]=(v[i+1]<<1|1)&h,0!==n&&(v[i]|=(y[i+1]|y[i])<<1|1|y[i+1]),v[i]&_&&(x=f(e,{errors:n,currentLocation:c,expectedLocation:d,distance:r}),x<=g)){if(g=x,p=c,p<=d)break;o=Math.max(1,2*d-p)}}if(f(e,{errors:n+1,currentLocation:d,expectedLocation:d,distance:r})>g)break;y=v}let v={isMatch:p>=0,score:Math.max(.001,x)};return a&&(v.indices=function(t=[],e=h.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let c=t.length;i<c;i+=1){let c=t[i];c&&-1===n?n=i:c||-1===n||(r=i-1,r-n+1>=e&&s.push([n,r]),n=-1)}return t[i-1]&&i-n>=e&&s.push([n,i-1]),s}(M,o)),v}function p(t){let e={},s=t.length;for(let n=0;n<s;n+=1)e[t.charAt(n)]=0;for(let n=0;n<s;n+=1)e[t.charAt(n)]|=1<<s-n-1;return e}class M{constructor(t,{location:e=h.location,threshold:s=h.threshold,distance:n=h.distance,includeMatches:r=h.includeMatches,findAllMatches:i=h.findAllMatches,minMatchCharLength:c=h.minMatchCharLength,isCaseSensitive:o=h.isCaseSensitive}={}){this.options={location:e,threshold:s,distance:n,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o},this.pattern=o?t:t.toLowerCase(),this.chunks=[];let a=0;for(;a<this.pattern.length;){let t=this.pattern.substring(a,a+32);this.chunks.push({pattern:t,alphabet:p(t)}),a+=32}}searchIn(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.indices=[[0,t.length-1]]),e}const{location:n,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:h}=this.options;let o=[],a=0,l=!1;this.chunks.forEach(({pattern:e,alphabet:u},d)=>{const{isMatch:f,score:p,indices:M}=g(t,e,u,{location:n+32*d,distance:r,threshold:i,findAllMatches:c,minMatchCharLength:h,includeMatches:s});f&&(l=!0),a+=p,f&&M&&(o=[...o,...M])});let u={isMatch:l,score:l?a/this.chunks.length:1};return l&&s&&(u.indices=o),u}}class m{constructor(t){this.pattern=t}static isMultiMatch(t){return y(t,this.multiRegex)}static isSingleMatch(t){return y(t,this.singleRegex)}search(){}}function y(t,e){const s=t.match(e);return s?s[1]:null}class x extends m{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,s=0;const n=[],r=this.pattern.length;for(;(e=t.indexOf(this.pattern,s))>-1;)s=e+r,n.push([e,s-1]);const i=!!n.length;return{isMatch:i,score:i?1:0,indices:n}}}class k extends m{constructor(t,{location:e=h.location,threshold:s=h.threshold,distance:n=h.distance,includeMatches:r=h.includeMatches,findAllMatches:i=h.findAllMatches,minMatchCharLength:c=h.minMatchCharLength,isCaseSensitive:o=h.isCaseSensitive}={}){super(t),this._bitapSearch=new M(t,{location:e,threshold:s,distance:n,includeMatches:r,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}const _=[x,class extends m{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},k],v=_.length,S=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;const C=new Set([k.type,x.type]);const A=[];function w(t,e){for(let s=0,n=A.length;s<n;s+=1){let n=A[s];if(n.condition(t,e))return new n(t,e)}return new M(t,e)}const L="$and",b="$or",$=t=>!(!t[L]&&!t[b]),E=t=>({[L]:Object.keys(t).map(e=>({[e]:t[e]}))});function I(s,n,{auto:r=!0}={}){const i=s=>{let c=Object.keys(s);if(c.length>1&&!$(s))return i(E(s));let h=c[0];if((e=>!t(e)&&"object"==typeof e&&!$(e))(s)){const t=s[h];if(!e(t))throw new Error(`Invalid value for key "${h}"`);const i={key:h,pattern:t};return r&&(i.searcher=w(t,n)),i}let o={children:[],operator:h};return c.forEach(e=>{const n=s[e];t(n)&&n.forEach(t=>{o.children.push(i(t))})}),o};return $(s)||(s=E(s)),i(s)}class O{constructor(t,e={},s){this.options={...h,...e},this._keyStore=new c(this.options.keys),this.setCollection(t,s)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof a))throw new Error("Incorrect index type");this._myIndex=e||l(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}add(t){n(t)&&(this._docs.push(t),this._myIndex.add(t))}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){let r=[];const{includeMatches:i,includeScore:c,shouldSort:o,sortFn:a}=this.options;if(e(t)){const s=w(t,this.options);r=e(this._docs[0])?this._searchStringArrayWith(s):this._searchObjectArrayWith(s)}else r=this._searchLogical(t);return function(t,e){t.forEach(t=>{let s=1;t.matches.forEach(({key:t,norm:n,score:r})=>{const i=e.get(t,"weight");s*=Math.pow(0===r&&i?Number.EPSILON:r,(i||1)*n)}),t.score=s})}(r,this._keyStore),o&&r.sort(a),s(n)&&n>-1&&(r=r.slice(0,n)),function(t,e,{includeMatches:s=h.includeMatches,includeScore:n=h.includeScore}={}){const r=[];s&&r.push(u);n&&r.push(d);return t.map(t=>{const{idx:s}=t,n={item:e[s],refIndex:s};return r.length&&r.forEach(e=>{e(t,n)}),n})}(r,this._docs,{includeMatches:i,includeScore:c})}_searchStringArrayWith(t){const{records:e}=this._myIndex,s=[];return e.forEach(({v:e,i:r,n:i})=>{if(!n(e))return;const{isMatch:c,score:h,indices:o}=t.searchIn(e);c&&s.push({item:e,idx:r,matches:[{score:h,value:e,norm:i,indices:o}]})}),s}_searchLogical(t){const e=I(t,this.options),{keys:s,records:r}=this._myIndex,i={},c=[],h=(t,e,n)=>{if(!t.children){const{key:n,searcher:r}=t,i=e[s.indexOf(n)];return this._findMatches({key:n,value:i,searcher:r})}{const s=t.operator;let r=[];for(let i=0;i<t.children.length;i+=1){let c=t.children[i],o=h(c,e,n);if(o&&o.length){if(r.push({idx:n,item:e,matches:o}),s===b)break}else if(s===L){r.length=0;break}}r.length&&(i[n]||(i[n]={idx:n,item:e,matches:[]},c.push(i[n])),r.forEach(({matches:t})=>{i[n].matches.push(...t)}))}};return r.forEach(({$:t,i:s})=>{n(t)&&h(e,t,s)}),c}_searchObjectArrayWith(t){const{keys:e,records:s}=this._myIndex,r=[];return s.forEach(({$:s,i:i})=>{if(!n(s))return;let c=[];e.forEach((e,n)=>{c.push(...this._findMatches({key:e,value:s[n],searcher:t}))}),c.length&&r.push({idx:i,item:s,matches:c})}),r}_findMatches({key:e,value:s,searcher:r}){if(!n(s))return[];let i=[];if(t(s))s.forEach(({v:t,i:s,n:c})=>{if(!n(t))return;const{isMatch:h,score:o,indices:a}=r.searchIn(t);h&&i.push({score:o,key:e,value:t,idx:s,norm:c,indices:a})});else{const{v:t,n:n}=s,{isMatch:c,score:h,indices:o}=r.searchIn(t);c&&i.push({score:h,key:e,value:t,norm:n,indices:o})}return i}}O.version="6.0.0-beta.0",O.createIndex=l,O.parseIndex=function(t,{getFn:e=h.getFn}={}){const{keys:s,records:n}=t;let r=new a({getFn:e});return r.setKeys(s),r.setRecords(n),r},O.config=h,function(...t){A.push(...t)}(class{constructor(t,{isCaseSensitive:e=h.isCaseSensitive,includeMatches:s=h.includeMatches,minMatchCharLength:n=h.minMatchCharLength,findAllMatches:r=h.findAllMatches,location:i=h.location,threshold:c=h.threshold,distance:o=h.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:s,minMatchCharLength:n,findAllMatches:r,location:i,threshold:c,distance:o},this.pattern=e?t:t.toLowerCase(),this.query=function(t,e={}){return t.split("|").map(t=>{let s=t.trim().split(S).filter(t=>t&&!!t.trim()),n=[];for(let t=0,r=s.length;t<r;t+=1){const r=s[t];let i=!1,c=-1;for(;!i&&++c<v;){const t=_[c];let s=t.isMultiMatch(r);s&&(n.push(new t(s,e)),i=!0)}if(!i)for(c=-1;++c<v;){const t=_[c];let s=t.isSingleMatch(r);if(s){n.push(new t(s,e));break}}}return n})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n}=this.options;t=n?t:t.toLowerCase();let r=0,i=[],c=0;for(let n=0,h=e.length;n<h;n+=1){const h=e[n];i.length=0,r=0;for(let e=0,n=h.length;e<n;e+=1){const n=h[e],{isMatch:o,indices:a,score:l}=n.search(t);if(!o){c=0,r=0,i.length=0;break}if(r+=1,c+=l,s){const t=n.constructor.type;C.has(t)?i=[...i,...a]:i.push(a)}}if(r){let t={isMatch:!0,score:c/r};return s&&(t.indices=i),t}}return{isMatch:!1,score:1}}});export default O;
function t(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function e(t){return"string"==typeof t}function s(t){return"number"==typeof t}function n(t){return null!=t}function i(t){return!t.trim().length}const r=Object.prototype.hasOwnProperty;class c{constructor(t){this._keys={},this._keyNames=[];let s=0;t.forEach(t=>{let n,i=1;if(e(t))n=t;else{if(!r.call(t,"name"))throw new Error("Key must contain a `name`");if(n=t.name,r.call(t,"weight")&&(i=t.weight,i<=0))throw new Error("`weight` property in key must be a positive integer")}this._keyNames.push(n),this._keys[n]={weight:i},s+=i}),this._keyNames.forEach(t=>{this._keys[t].weight/=s})}get(t,e){return this._keys[t]&&this._keys[t][e]}keys(){return this._keyNames}toJSON(){return JSON.stringify(this._keys)}}var h={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...{useExtendedSearch:!1,getFn:function(i,r){let c=[],h=!1;const o=(i,r)=>{if(r){const a=r.indexOf(".");let l=r,u=null;-1!==a&&(l=r.slice(0,a),u=r.slice(a+1));const d=i[l];if(!n(d))return;if(u||!e(d)&&!s(d))if(t(d)){h=!0;for(let t=0,e=d.length;t<e;t+=1)o(d[t],u)}else u&&o(d,u);else c.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(d))}else c.push(i)};return o(i,r),h?c:c[0]}}};const o=/[^ ]+/g;class a{constructor({getFn:t=h.getFn}={}){this.norm=function(t=3){const e=new Map;return{get(s){const n=s.match(o).length;if(e.has(n))return e.get(n);const i=parseFloat((1/Math.sqrt(n)).toFixed(t));return e.set(n,i),i},clear(){e.clear()}}}(3),this.getFn=t,this.isCreated=!1,this.setRecords()}setCollection(t=[]){this.docs=t}setRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,e(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const s=this.size();e(t)?this._addString(t,s):this._addObject(t,s)}removeAt(t){this.records.splice(t,1);for(let e=t,s=this.size();e<s;e+=1)this.records[e].i-=1}size(){return this.records.length}_addString(t,e){if(!n(t)||i(t))return;let s={v:t,i:e,n:this.norm.get(t)};this.records.push(s)}_addObject(s,r){let c={i:r,$:{}};this.keys.forEach((r,h)=>{let o=this.getFn(s,r);if(n(o))if(t(o)){let s=[];const r=[{nestedArrIndex:-1,value:o}];for(;r.length;){const{nestedArrIndex:c,value:h}=r.pop();if(n(h))if(e(h)&&!i(h)){let t={v:h,i:c,n:this.norm.get(h)};s.push(t)}else t(h)&&h.forEach((t,e)=>{r.push({nestedArrIndex:e,value:t})})}c.$[h]=s}else if(!i(o)){let t={v:o,n:this.norm.get(o)};c.$[h]=t}}),this.records.push(c)}toJSON(){return{keys:this.keys,records:this.records}}}function l(t,e,{getFn:s=h.getFn}={}){let n=new a({getFn:s});return n.setKeys(t),n.setCollection(e),n.create(),n}function u(t,e){const s=t.matches;if(e.matches=[],n(s))for(let t=0,i=s.length;t<i;t+=1){let i=s[t];if(!n(i.indices)||0===i.indices.length)continue;const{indices:r,value:c}=i;let h={indices:r,value:c};i.key&&(h.key=i.key),i.idx>-1&&(h.refIndex=i.idx),e.matches.push(h)}}function d(t,e){e.score=t.score}function f(t,{errors:e=0,currentLocation:s=0,expectedLocation:n=0,distance:i=h.distance}={}){const r=e/t.length,c=Math.abs(n-s);return i?r+c/i:c?1:r}function g(t,e,s,{location:n=h.location,distance:i=h.distance,threshold:r=h.threshold,findAllMatches:c=h.findAllMatches,minMatchCharLength:o=h.minMatchCharLength,includeMatches:a=h.includeMatches}={}){if(e.length>32)throw new Error("Pattern length exceeds max of 32.");const l=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let g=r,p=d;const M=[];if(a)for(let t=0;t<u;t+=1)M[t]=0;let m;for(;(m=t.indexOf(e,p))>-1;){let t=f(e,{currentLocation:m,expectedLocation:d,distance:i});if(g=Math.min(t,g),p=m+l,a){let t=0;for(;t<l;)M[m+t]=1,t+=1}}p=-1;let y=[],x=1,k=l+u;const _=1<<(l<=31?l-1:30);for(let n=0;n<l;n+=1){let r=0,h=k;for(;r<h;){f(e,{errors:n,currentLocation:d+h,expectedLocation:d,distance:i})<=g?r=h:k=h,h=Math.floor((k-r)/2+r)}k=h;let o=Math.max(1,d-h+1),m=c?u:Math.min(d+h,u)+l,v=Array(m+2);v[m+1]=(1<<n)-1;for(let r=m;r>=o;r-=1){let c=r-1,h=s[t.charAt(c)];if(h&&a&&(M[c]=1),v[r]=(v[r+1]<<1|1)&h,0!==n&&(v[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),v[r]&_&&(x=f(e,{errors:n,currentLocation:c,expectedLocation:d,distance:i}),x<=g)){if(g=x,p=c,p<=d)break;o=Math.max(1,2*d-p)}}if(f(e,{errors:n+1,currentLocation:d,expectedLocation:d,distance:i})>g)break;y=v}let v={isMatch:p>=0,score:Math.max(.001,x)};return a&&(v.indices=function(t=[],e=h.minMatchCharLength){let s=[],n=-1,i=-1,r=0;for(let c=t.length;r<c;r+=1){let c=t[r];c&&-1===n?n=r:c||-1===n||(i=r-1,i-n+1>=e&&s.push([n,i]),n=-1)}return t[r-1]&&r-n>=e&&s.push([n,r-1]),s}(M,o)),v}function p(t){let e={},s=t.length;for(let n=0;n<s;n+=1)e[t.charAt(n)]=0;for(let n=0;n<s;n+=1)e[t.charAt(n)]|=1<<s-n-1;return e}class M{constructor(t,{location:e=h.location,threshold:s=h.threshold,distance:n=h.distance,includeMatches:i=h.includeMatches,findAllMatches:r=h.findAllMatches,minMatchCharLength:c=h.minMatchCharLength,isCaseSensitive:o=h.isCaseSensitive}={}){this.options={location:e,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:o},this.pattern=o?t:t.toLowerCase(),this.chunks=[];let a=0;for(;a<this.pattern.length;){let t=this.pattern.substring(a,a+32);this.chunks.push({pattern:t,alphabet:p(t)}),a+=32}}searchIn(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.indices=[[0,t.length-1]]),e}const{location:n,distance:i,threshold:r,findAllMatches:c,minMatchCharLength:h}=this.options;let o=[],a=0,l=!1;this.chunks.forEach(({pattern:e,alphabet:u},d)=>{const{isMatch:f,score:p,indices:M}=g(t,e,u,{location:n+32*d,distance:i,threshold:r,findAllMatches:c,minMatchCharLength:h,includeMatches:s});f&&(l=!0),a+=p,f&&M&&(o=[...o,...M])});let u={isMatch:l,score:l?a/this.chunks.length:1};return l&&s&&(u.indices=o),u}}class m{constructor(t){this.pattern=t}static isMultiMatch(t){return y(t,this.multiRegex)}static isSingleMatch(t){return y(t,this.singleRegex)}search(){}}function y(t,e){const s=t.match(e);return s?s[1]:null}class x extends m{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,s=0;const n=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,s))>-1;)s=e+i,n.push([e,s-1]);const r=!!n.length;return{isMatch:r,score:r?1:0,indices:n}}}class k extends m{constructor(t,{location:e=h.location,threshold:s=h.threshold,distance:n=h.distance,includeMatches:i=h.includeMatches,findAllMatches:r=h.findAllMatches,minMatchCharLength:c=h.minMatchCharLength,isCaseSensitive:o=h.isCaseSensitive}={}){super(t),this._bitapSearch=new M(t,{location:e,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}const _=[x,class extends m{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends m{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},k],v=_.length,S=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;const C=new Set([k.type,x.type]);const L=[];function w(t,e){for(let s=0,n=L.length;s<n;s+=1){let n=L[s];if(n.condition(t,e))return new n(t,e)}return new M(t,e)}const A="$and",b="$or",$=t=>!(!t[A]&&!t[b]),E=t=>({[A]:Object.keys(t).map(e=>({[e]:t[e]}))});function I(s,n,{auto:i=!0}={}){const r=s=>{let c=Object.keys(s);if(c.length>1&&!$(s))return r(E(s));let h=c[0];if((e=>!t(e)&&"object"==typeof e&&!$(e))(s)){const t=s[h];if(!e(t))throw new Error(`Invalid value for key "${h}"`);const r={key:h,pattern:t};return i&&(r.searcher=w(t,n)),r}let o={children:[],operator:h};return c.forEach(e=>{const n=s[e];t(n)&&n.forEach(t=>{o.children.push(r(t))})}),o};return $(s)||(s=E(s)),r(s)}class O{constructor(t,e={},s){this.options={...h,...e},this._keyStore=new c(this.options.keys),this.setCollection(t,s)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof a))throw new Error("Incorrect `index` type");this._myIndex=e||l(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}add(t){n(t)&&(this._docs.push(t),this._myIndex.add(t))}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:i,includeScore:r,shouldSort:c,sortFn:o}=this.options;let a=e(t)?e(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,e){t.forEach(t=>{let s=1;t.matches.forEach(({key:t,norm:n,score:i})=>{const r=e.get(t,"weight");s*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*n)}),t.score=s})}(a,this._keyStore),c&&a.sort(o),s(n)&&n>-1&&(a=a.slice(0,n)),function(t,e,{includeMatches:s=h.includeMatches,includeScore:n=h.includeScore}={}){const i=[];s&&i.push(u);n&&i.push(d);return t.map(t=>{const{idx:s}=t,n={item:e[s],refIndex:s};return i.length&&i.forEach(e=>{e(t,n)}),n})}(a,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t){const e=w(t,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:t,i:s,n:r})=>{if(!n(t))return;const{isMatch:c,score:h,indices:o}=e.searchIn(t);c&&i.push({item:t,idx:s,matches:[{score:h,value:t,norm:r,indices:o}]})}),i}_searchLogical(t){const e=I(t,this.options),{keys:s,records:i}=this._myIndex,r={},c=[],h=(t,e,n)=>{if(!t.children){const{key:n,searcher:i}=t,r=e[s.indexOf(n)];return this._findMatches({key:n,value:r,searcher:i})}{const s=t.operator;let i=[];for(let r=0;r<t.children.length;r+=1){let c=t.children[r],o=h(c,e,n);if(o&&o.length){if(i.push({idx:n,item:e,matches:o}),s===b)break}else if(s===A){i.length=0;break}}i.length&&(r[n]||(r[n]={idx:n,item:e,matches:[]},c.push(r[n])),i.forEach(({matches:t})=>{r[n].matches.push(...t)}))}};return i.forEach(({$:t,i:s})=>{n(t)&&h(e,t,s)}),c}_searchObjectList(t){const e=w(t,this.options),{keys:s,records:i}=this._myIndex,r=[];return i.forEach(({$:t,i:i})=>{if(!n(t))return;let c=[];s.forEach((s,n)=>{c.push(...this._findMatches({key:s,value:t[n],searcher:e}))}),c.length&&r.push({idx:i,item:t,matches:c})}),r}_findMatches({key:e,value:s,searcher:i}){if(!n(s))return[];let r=[];if(t(s))s.forEach(({v:t,i:s,n:c})=>{if(!n(t))return;const{isMatch:h,score:o,indices:a}=i.searchIn(t);h&&r.push({score:o,key:e,value:t,idx:s,norm:c,indices:a})});else{const{v:t,n:n}=s,{isMatch:c,score:h,indices:o}=i.searchIn(t);c&&r.push({score:h,key:e,value:t,norm:n,indices:o})}return r}}O.version="6.0.0-beta.1",O.createIndex=l,O.parseIndex=function(t,{getFn:e=h.getFn}={}){const{keys:s,records:n}=t;let i=new a({getFn:e});return i.setKeys(s),i.setRecords(n),i},O.config=h,function(...t){L.push(...t)}(class{constructor(t,{isCaseSensitive:e=h.isCaseSensitive,includeMatches:s=h.includeMatches,minMatchCharLength:n=h.minMatchCharLength,findAllMatches:i=h.findAllMatches,location:r=h.location,threshold:c=h.threshold,distance:o=h.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:s,minMatchCharLength:n,findAllMatches:i,location:r,threshold:c,distance:o},this.pattern=e?t:t.toLowerCase(),this.query=function(t,e={}){return t.split("|").map(t=>{let s=t.trim().split(S).filter(t=>t&&!!t.trim()),n=[];for(let t=0,i=s.length;t<i;t+=1){const i=s[t];let r=!1,c=-1;for(;!r&&++c<v;){const t=_[c];let s=t.isMultiMatch(i);s&&(n.push(new t(s,e)),r=!0)}if(!r)for(c=-1;++c<v;){const t=_[c];let s=t.isSingleMatch(i);if(s){n.push(new t(s,e));break}}}return n})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n}=this.options;t=n?t:t.toLowerCase();let i=0,r=[],c=0;for(let n=0,h=e.length;n<h;n+=1){const h=e[n];r.length=0,i=0;for(let e=0,n=h.length;e<n;e+=1){const n=h[e],{isMatch:o,indices:a,score:l}=n.search(t);if(!o){c=0,i=0,r.length=0;break}if(i+=1,c+=l,s){const t=n.constructor.type;C.has(t)?r=[...r,...a]:r.push(a)}}if(i){let t={isMatch:!0,score:c/i};return s&&(t.indices=r),t}}return{isMatch:!1,score:1}}});export default O;
/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -266,3 +266,3 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

if (!hasOwn.call(key, 'name')) {
throw new Error('Key must contain a name');
throw new Error('Key must contain a `name`');
}

@@ -276,3 +276,3 @@

if (weight <= 0) {
throw new Error('"weight" property in key must be a positive integer');
throw new Error('`weight` property in key must be a positive integer');
}

@@ -319,5 +319,5 @@ }

var _get = function _get(obj, path) {
var deepGet = function deepGet(obj, path) {
if (!path) {
// If there's no path left, we've gotten to the object we care about.
// If there's no path left, we've arrived at the object we care about.
list.push(obj);

@@ -336,15 +336,17 @@ } else {

if (isDefined(value)) {
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
if (!isDefined(value)) {
return;
}
for (var i = 0, len = value.length; i < len; i += 1) {
_get(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
_get(value, remaining);
if (!remaining && (isString(value) || isNumber(value))) {
list.push(toString(value));
} else if (isArray(value)) {
arr = true; // Search each item in the array.
for (var i = 0, len = value.length; i < len; i += 1) {
deepGet(value[i], remaining);
}
} else if (remaining) {
// An object. Recurse further.
deepGet(value, remaining);
}

@@ -354,9 +356,4 @@ }

_get(obj, path);
if (arr) {
return list;
}
return list[0];
deepGet(obj, path);
return arr ? list : list[0];
}

@@ -1701,3 +1698,3 @@

if (index && !(index instanceof FuseIndex)) {
throw new Error('Incorrect index type');
throw new Error('Incorrect `index` type');
}

@@ -1739,3 +1736,2 @@

var results = [];
var _this$options = this.options,

@@ -1746,10 +1742,3 @@ includeMatches = _this$options.includeMatches,

sortFn = _this$options.sortFn;
if (isString(query)) {
var searcher = createSearcher(query, this.options);
results = isString(this._docs[0]) ? this._searchStringArrayWith(searcher) : this._searchObjectArrayWith(searcher);
} else {
results = this._searchLogical(query);
}
var results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);
computeScore$1(results, this._keyStore);

@@ -1771,4 +1760,5 @@

}, {
key: "_searchStringArrayWith",
value: function _searchStringArrayWith(searcher) {
key: "_searchStringList",
value: function _searchStringList(query) {
var searcher = createSearcher(query, this.options);
var records = this._myIndex.records;

@@ -1887,6 +1877,7 @@ var results = []; // Iterate over every string in the index

}, {
key: "_searchObjectArrayWith",
value: function _searchObjectArrayWith(searcher) {
key: "_searchObjectList",
value: function _searchObjectList(query) {
var _this2 = this;
var searcher = createSearcher(query, this.options);
var _this$_myIndex2 = this._myIndex,

@@ -2032,3 +2023,3 @@ keys = _this$_myIndex2.keys,

Fuse.version = '6.0.0-beta.0';
Fuse.version = '6.0.0-beta.1';
Fuse.createIndex = createIndex;

@@ -2035,0 +2026,0 @@ Fuse.parseIndex = parseIndex;

/**
* Fuse.js v6.0.0-beta.0 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v6.0.0-beta.1 - Lightweight fuzzy-search (http://fusejs.io)
*

@@ -9,2 +9,2 @@ * Copyright (c) 2020 Kiro Risk (http://kiro.me)

*/
var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return function(){var t,n=s(e);if(h()){var r=s(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)}}function d(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function g(e){return"string"==typeof e}function p(e){return"number"==typeof e}function m(e){return null!=e}function k(e){return!e.trim().length}var M=Object.prototype.hasOwnProperty,b=function(){function e(n){var r=this;t(this,e),this._keys={},this._keyNames=[];var i=0;n.forEach((function(e){var t,n=1;if(g(e))t=e;else{if(!M.call(e,"name"))throw new Error("Key must contain a name");if(t=e.name,M.call(e,"weight")&&(n=e.weight)<=0)throw new Error('"weight" property in key must be a positive integer')}r._keyNames.push(t),r._keys[t]={weight:n},i+=n})),this._keyNames.forEach((function(e){r._keys[e].weight/=i}))}return r(e,[{key:"get",value:function(e,t){return this._keys[e]&&this._keys[e][t]}},{key:"keys",value:function(){return this._keyNames}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}(),x=c({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i){if(i){var o=i.indexOf("."),c=i,a=null;-1!==o&&(c=i.slice(0,o),a=i.slice(o+1));var s=t[c];if(m(s))if(a||!g(s)&&!p(s))if(y(s)){r=!0;for(var u=0,h=s.length;u<h;u+=1)e(s[u],a)}else a&&e(s,a);else n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(s))}else n.push(t)}(e,t),r?n:n[0]}}),S=/[^ ]+/g;function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map;return{get:function(n){var r=n.match(S).length;if(t.has(r))return t.get(r);var i=parseFloat((1/Math.sqrt(r)).toFixed(e));return t.set(r,i),i},clear:function(){t.clear()}}}var w=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?x.getFn:r;t(this,e),this.norm=_(3),this.getFn=i,this.isCreated=!1,this.setRecords()}return r(e,[{key:"setCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=e}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(m(e)&&!k(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var o=n.getFn(e,t);if(m(o))if(y(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var c=t.pop(),a=c.nestedArrIndex,s=c.value;if(m(s))if(g(s)&&!k(s)){var u={v:s,i:a,n:n.norm.get(s)};e.push(u)}else y(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!k(o)){var c={v:o,n:n.norm.get(o)};r.$[i]=c}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?x.getFn:r,o=new w({getFn:i});return o.setKeys(e),o.setCollection(t),o.create(),o}function A(e,t){var n=e.matches;if(t.matches=[],m(n))for(var r=0,i=n.length;r<i;r+=1){var o=n[r];if(m(o.indices)&&0!==o.indices.length){var c={indices:o.indices,value:o.value};o.key&&(c.key=o.key),o.idx>-1&&(c.refIndex=o.idx),t.matches.push(c)}}}function C(e,t){t.score=e.score}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?x.distance:s,h=r/e.length,f=Math.abs(a-o);return u?h+f/u:f?1:h}function E(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function L(e){for(var t={},n=e.length,r=0;r<n;r+=1)t[e.charAt(r)]=0;for(var i=0;i<n;i+=1)t[e.charAt(i)]|=1<<n-i-1;return t}var I=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,o=void 0===i?x.location:i,c=r.threshold,a=void 0===c?x.threshold:c,s=r.distance,u=void 0===s?x.distance:s,h=r.includeMatches,f=void 0===h?x.includeMatches:h,l=r.findAllMatches,d=void 0===l?x.findAllMatches:l,v=r.minMatchCharLength,y=void 0===v?x.minMatchCharLength:v,g=r.isCaseSensitive,p=void 0===g?x.isCaseSensitive:g;t(this,e),this.options={location:o,threshold:a,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:y,isCaseSensitive:p},this.pattern=p?n:n.toLowerCase(),this.chunks=[];for(var m=0;m<this.pattern.length;){var k=this.pattern.substring(m,m+32);this.chunks.push({pattern:k,alphabet:L(k)}),m+=32}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,a=o.distance,s=o.threshold,u=o.findAllMatches,h=o.minMatchCharLength,f=[],l=0,v=!1;this.chunks.forEach((function(t,n){var i=t.pattern,o=t.alphabet,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?x.location:i,c=r.distance,a=void 0===c?x.distance:c,s=r.threshold,u=void 0===s?x.threshold:s,h=r.findAllMatches,f=void 0===h?x.findAllMatches:h,l=r.minMatchCharLength,d=void 0===l?x.minMatchCharLength:l,v=r.includeMatches,y=void 0===v?x.includeMatches:v;if(t.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));var g,p=t.length,m=e.length,k=Math.max(0,Math.min(o,m)),M=u,b=k,S=[];if(y)for(var _=0;_<m;_+=1)S[_]=0;for(;(g=e.indexOf(t,b))>-1;){var w=j(t,{currentLocation:g,expectedLocation:k,distance:a});if(M=Math.min(w,M),b=g+p,y)for(var O=0;O<p;)S[g+O]=1,O+=1}b=-1;for(var A=[],C=1,L=p+m,I=1<<(p<=31?p-1:30),$=0;$<p;$+=1){for(var R=0,F=L;R<F;){var P=j(t,{errors:$,currentLocation:k+F,expectedLocation:k,distance:a});P<=M?R=F:L=F,F=Math.floor((L-R)/2+R)}L=F;var N=Math.max(1,k-F+1),W=f?m:Math.min(k+F,m)+p,D=Array(W+2);D[W+1]=(1<<$)-1;for(var z=W;z>=N;z-=1){var q=z-1,K=n[e.charAt(q)];if(K&&y&&(S[q]=1),D[z]=(D[z+1]<<1|1)&K,0!==$&&(D[z]|=(A[z+1]|A[z])<<1|1|A[z+1]),D[z]&I&&(C=j(t,{errors:$,currentLocation:q,expectedLocation:k,distance:a}))<=M){if(M=C,(b=q)<=k)break;N=Math.max(1,2*k-b)}}var J=j(t,{errors:$+1,currentLocation:k,expectedLocation:k,distance:a});if(J>M)break;A=D}var T={isMatch:b>=0,score:Math.max(.001,C)};return y&&(T.indices=E(S,d)),T}(e,i,o,{location:c+32*n,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r}),g=y.isMatch,p=y.score,m=y.indices;g&&(v=!0),l+=p,g&&m&&(f=[].concat(d(f),d(m)))}));var y={isMatch:v,score:v?l/this.chunks.length:1};return v&&r&&(y.indices=f),y}}]),e}(),$=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return R(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return R(e,this.singleRegex)}}]),e}();function R(e,t){var n=e.match(t);return n?n[1]:null}var F=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?1:0,indices:r}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}($),P=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}($),N=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}($),W=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}($),D=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}($),z=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}($),q=function(e){a(i,e);var n=l(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?x.location:c,s=o.threshold,u=void 0===s?x.threshold:s,h=o.distance,f=void 0===h?x.distance:h,l=o.includeMatches,d=void 0===l?x.includeMatches:l,v=o.findAllMatches,y=void 0===v?x.findAllMatches:v,g=o.minMatchCharLength,p=void 0===g?x.minMatchCharLength:g,m=o.isCaseSensitive,k=void 0===m?x.isCaseSensitive:m;return t(this,i),(r=n.call(this,e))._bitapSearch=new I(e,{location:a,threshold:u,distance:f,includeMatches:d,findAllMatches:y,minMatchCharLength:p,isCaseSensitive:k}),r}return r(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}($),K=[F,N,W,z,D,P,q],J=K.length,T=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(T).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<J;){var u=K[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<J;){var f=K[s],l=f.isSingleMatch(c);if(l){r.push(new f(l,t));break}}}return r}))}var B=new Set([q.type,F.type]),G=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.isCaseSensitive,o=void 0===i?x.isCaseSensitive:i,c=r.includeMatches,a=void 0===c?x.includeMatches:c,s=r.minMatchCharLength,u=void 0===s?x.minMatchCharLength:s,h=r.findAllMatches,f=void 0===h?x.findAllMatches:h,l=r.location,d=void 0===l?x.location:l,v=r.threshold,y=void 0===v?x.threshold:v,g=r.distance,p=void 0===g?x.distance:g;t(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:f,location:d,threshold:y,distance:p},this.pattern=o?n:n.toLowerCase(),this.query=U(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a<s;a+=1){var u=t[a];o.length=0,i=0;for(var h=0,f=u.length;h<f;h+=1){var l=u[h],v=l.search(e),y=v.isMatch,g=v.indices,p=v.score;if(!y){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=l.constructor.type;B.has(m)?o=[].concat(d(o),d(g)):o.push(g)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),H=[];function Q(e,t){for(var n=0,r=H.length;n<r;n+=1){var i=H[n];if(i.condition(e,t))return new i(e,t)}return new I(e,t)}var V="$and",X="$or",Y=function(e){return!(!e[V]&&!e[X])},Z=function(t){return!y(t)&&"object"===e(t)&&!Y(t)},ee=function(e){return i({},V,Object.keys(e).map((function(t){return i({},t,e[t])})))},te=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=c({},x,{},r),this._keyStore=new b(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof w))throw new Error("Incorrect index type");this._myIndex=t||O(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){m(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=[],o=this.options,c=o.includeMatches,a=o.includeScore,s=o.shouldSort,u=o.sortFn;if(g(e)){var h=Q(e,this.options);i=g(this._docs[0])?this._searchStringArrayWith(h):this._searchObjectArrayWith(h)}else i=this._searchLogical(e);return ne(i,this._keyStore),s&&i.sort(u),p(r)&&r>-1&&(i=i.slice(0,r)),re(i,this._docs,{includeMatches:c,includeScore:a})}},{key:"_searchStringArrayWith",value:function(e){var t=this._myIndex.records,n=[];return t.forEach((function(t){var r=t.v,i=t.i,o=t.n;if(m(r)){var c=e.searchIn(r),a=c.isMatch,s=c.score,u=c.indices;a&&n.push({item:r,idx:i,matches:[{score:s,value:r,norm:o,indices:u}]})}})),n}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n);if(r.length>1&&!Y(n))return e(ee(n));var o=r[0];if(Z(n)){var c=n[o];if(!g(c))throw new Error('Invalid value for key "'.concat(o,'"'));var a={key:o,pattern:c};return i&&(a.searcher=Q(c,t)),a}var s={children:[],operator:o};return r.forEach((function(t){var r=n[t];y(r)&&r.forEach((function(t){s.children.push(e(t))}))})),s};return Y(e)||(e=ee(e)),o(e)}(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c={},a=[];return o.forEach((function(e){var r=e.$,o=e.i;m(r)&&function e(n,r,o){if(!n.children){var s=n.key,u=n.searcher,h=r[i.indexOf(s)];return t._findMatches({key:s,value:h,searcher:u})}for(var f=n.operator,l=[],v=0;v<n.children.length;v+=1){var y=e(n.children[v],r,o);if(y&&y.length){if(l.push({idx:o,item:r,matches:y}),f===X)break}else if(f===V){l.length=0;break}}l.length&&(c[o]||(c[o]={idx:o,item:r,matches:[]},a.push(c[o])),l.forEach((function(e){var t,n=e.matches;(t=c[o].matches).push.apply(t,d(n))})))}(n,r,o)})),a}},{key:"_searchObjectArrayWith",value:function(e){var t=this,n=this._myIndex,r=n.keys,i=n.records,o=[];return i.forEach((function(n){var i=n.$,c=n.i;if(m(i)){var a=[];r.forEach((function(n,r){a.push.apply(a,d(t._findMatches({key:n,value:i[r],searcher:e})))})),a.length&&o.push({idx:c,item:i,matches:a})}})),o}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!m(n))return[];var i=[];if(y(n))n.forEach((function(e){var n=e.v,o=e.i,c=e.n;if(m(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}}));else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}]),e}();function ne(e,t){e.forEach((function(e){var n=1;e.matches.forEach((function(e){var r=e.key,i=e.norm,o=e.score,c=t.get(r,"weight");n*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*i)})),e.score=n}))}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?x.includeMatches:r,o=n.includeScore,c=void 0===o?x.includeScore:o,a=[];return i&&a.push(A),c&&a.push(C),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}return te.version="6.0.0-beta.0",te.createIndex=O,te.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?x.getFn:n,i=e.keys,o=e.records,c=new w({getFn:r});return c.setKeys(i),c.setRecords(o),c},te.config=x,function(){H.push.apply(H,arguments)}(G),te},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();
var e,t;e=this,t=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return function(){var t,n=s(e);if(h()){var r=s(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return f(this,t)}}function d(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function g(e){return"string"==typeof e}function p(e){return"number"==typeof e}function m(e){return null!=e}function k(e){return!e.trim().length}var M=Object.prototype.hasOwnProperty,b=function(){function e(n){var r=this;t(this,e),this._keys={},this._keyNames=[];var i=0;n.forEach((function(e){var t,n=1;if(g(e))t=e;else{if(!M.call(e,"name"))throw new Error("Key must contain a `name`");if(t=e.name,M.call(e,"weight")&&(n=e.weight)<=0)throw new Error("`weight` property in key must be a positive integer")}r._keyNames.push(t),r._keys[t]={weight:n},i+=n})),this._keyNames.forEach((function(e){r._keys[e].weight/=i}))}return r(e,[{key:"get",value:function(e,t){return this._keys[e]&&this._keys[e][t]}},{key:"keys",value:function(){return this._keyNames}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}(),x=c({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i){if(i){var o=i.indexOf("."),c=i,a=null;-1!==o&&(c=i.slice(0,o),a=i.slice(o+1));var s=t[c];if(!m(s))return;if(a||!g(s)&&!p(s))if(y(s)){r=!0;for(var u=0,h=s.length;u<h;u+=1)e(s[u],a)}else a&&e(s,a);else n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(s))}else n.push(t)}(e,t),r?n:n[0]}}),S=/[^ ]+/g;function _(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map;return{get:function(n){var r=n.match(S).length;if(t.has(r))return t.get(r);var i=parseFloat((1/Math.sqrt(r)).toFixed(e));return t.set(r,i),i},clear:function(){t.clear()}}}var w=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?x.getFn:r;t(this,e),this.norm=_(3),this.getFn=i,this.isCreated=!1,this.setRecords()}return r(e,[{key:"setCollection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=e}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(m(e)&&!k(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var o=n.getFn(e,t);if(m(o))if(y(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var c=t.pop(),a=c.nestedArrIndex,s=c.value;if(m(s))if(g(s)&&!k(s)){var u={v:s,i:a,n:n.norm.get(s)};e.push(u)}else y(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!k(o)){var c={v:o,n:n.norm.get(o)};r.$[i]=c}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?x.getFn:r,o=new w({getFn:i});return o.setKeys(e),o.setCollection(t),o.create(),o}function C(e,t){var n=e.matches;if(t.matches=[],m(n))for(var r=0,i=n.length;r<i;r+=1){var o=n[r];if(m(o.indices)&&0!==o.indices.length){var c={indices:o.indices,value:o.value};o.key&&(c.key=o.key),o.idx>-1&&(c.refIndex=o.idx),t.matches.push(c)}}}function A(e,t){t.score=e.score}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?x.distance:s,h=r/e.length,f=Math.abs(a-o);return u?h+f/u:f?1:h}function j(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:x.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function E(e){for(var t={},n=e.length,r=0;r<n;r+=1)t[e.charAt(r)]=0;for(var i=0;i<n;i+=1)t[e.charAt(i)]|=1<<n-i-1;return t}var I=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,o=void 0===i?x.location:i,c=r.threshold,a=void 0===c?x.threshold:c,s=r.distance,u=void 0===s?x.distance:s,h=r.includeMatches,f=void 0===h?x.includeMatches:h,l=r.findAllMatches,d=void 0===l?x.findAllMatches:l,v=r.minMatchCharLength,y=void 0===v?x.minMatchCharLength:v,g=r.isCaseSensitive,p=void 0===g?x.isCaseSensitive:g;t(this,e),this.options={location:o,threshold:a,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:y,isCaseSensitive:p},this.pattern=p?n:n.toLowerCase(),this.chunks=[];for(var m=0;m<this.pattern.length;){var k=this.pattern.substring(m,m+32);this.chunks.push({pattern:k,alphabet:E(k)}),m+=32}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,a=o.distance,s=o.threshold,u=o.findAllMatches,h=o.minMatchCharLength,f=[],l=0,v=!1;this.chunks.forEach((function(t,n){var i=t.pattern,o=t.alphabet,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?x.location:i,c=r.distance,a=void 0===c?x.distance:c,s=r.threshold,u=void 0===s?x.threshold:s,h=r.findAllMatches,f=void 0===h?x.findAllMatches:h,l=r.minMatchCharLength,d=void 0===l?x.minMatchCharLength:l,v=r.includeMatches,y=void 0===v?x.includeMatches:v;if(t.length>32)throw new Error("Pattern length exceeds max of ".concat(32,"."));var g,p=t.length,m=e.length,k=Math.max(0,Math.min(o,m)),M=u,b=k,S=[];if(y)for(var _=0;_<m;_+=1)S[_]=0;for(;(g=e.indexOf(t,b))>-1;){var w=L(t,{currentLocation:g,expectedLocation:k,distance:a});if(M=Math.min(w,M),b=g+p,y)for(var O=0;O<p;)S[g+O]=1,O+=1}b=-1;for(var C=[],A=1,E=p+m,I=1<<(p<=31?p-1:30),$=0;$<p;$+=1){for(var R=0,F=E;R<F;){var P=L(t,{errors:$,currentLocation:k+F,expectedLocation:k,distance:a});P<=M?R=F:E=F,F=Math.floor((E-R)/2+R)}E=F;var N=Math.max(1,k-F+1),D=f?m:Math.min(k+F,m)+p,z=Array(D+2);z[D+1]=(1<<$)-1;for(var q=D;q>=N;q-=1){var K=q-1,W=n[e.charAt(K)];if(W&&y&&(S[K]=1),z[q]=(z[q+1]<<1|1)&W,0!==$&&(z[q]|=(C[q+1]|C[q])<<1|1|C[q+1]),z[q]&I&&(A=L(t,{errors:$,currentLocation:K,expectedLocation:k,distance:a}))<=M){if(M=A,(b=K)<=k)break;N=Math.max(1,2*k-b)}}var J=L(t,{errors:$+1,currentLocation:k,expectedLocation:k,distance:a});if(J>M)break;C=z}var T={isMatch:b>=0,score:Math.max(.001,A)};return y&&(T.indices=j(S,d)),T}(e,i,o,{location:c+32*n,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r}),g=y.isMatch,p=y.score,m=y.indices;g&&(v=!0),l+=p,g&&m&&(f=[].concat(d(f),d(m)))}));var y={isMatch:v,score:v?l/this.chunks.length:1};return v&&r&&(y.indices=f),y}}]),e}(),$=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return R(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return R(e,this.singleRegex)}}]),e}();function R(e,t){var n=e.match(t);return n?n[1]:null}var F=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?1:0,indices:r}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}($),P=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),i}($),N=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),i}($),D=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),i}($),z=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),i}($),q=function(e){a(i,e);var n=l(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),i}($),K=function(e){a(i,e);var n=l(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?x.location:c,s=o.threshold,u=void 0===s?x.threshold:s,h=o.distance,f=void 0===h?x.distance:h,l=o.includeMatches,d=void 0===l?x.includeMatches:l,v=o.findAllMatches,y=void 0===v?x.findAllMatches:v,g=o.minMatchCharLength,p=void 0===g?x.minMatchCharLength:g,m=o.isCaseSensitive,k=void 0===m?x.isCaseSensitive:m;return t(this,i),(r=n.call(this,e))._bitapSearch=new I(e,{location:a,threshold:u,distance:f,includeMatches:d,findAllMatches:y,minMatchCharLength:p,isCaseSensitive:k}),r}return r(i,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),i}($),W=[F,N,D,q,z,P,K],J=W.length,T=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(T).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<J;){var u=W[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<J;){var f=W[s],l=f.isSingleMatch(c);if(l){r.push(new f(l,t));break}}}return r}))}var B=new Set([K.type,F.type]),G=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.isCaseSensitive,o=void 0===i?x.isCaseSensitive:i,c=r.includeMatches,a=void 0===c?x.includeMatches:c,s=r.minMatchCharLength,u=void 0===s?x.minMatchCharLength:s,h=r.findAllMatches,f=void 0===h?x.findAllMatches:h,l=r.location,d=void 0===l?x.location:l,v=r.threshold,y=void 0===v?x.threshold:v,g=r.distance,p=void 0===g?x.distance:g;t(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:f,location:d,threshold:y,distance:p},this.pattern=o?n:n.toLowerCase(),this.query=U(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a<s;a+=1){var u=t[a];o.length=0,i=0;for(var h=0,f=u.length;h<f;h+=1){var l=u[h],v=l.search(e),y=v.isMatch,g=v.indices,p=v.score;if(!y){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=l.constructor.type;B.has(m)?o=[].concat(d(o),d(g)):o.push(g)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),H=[];function Q(e,t){for(var n=0,r=H.length;n<r;n+=1){var i=H[n];if(i.condition(e,t))return new i(e,t)}return new I(e,t)}var V="$and",X="$or",Y=function(e){return!(!e[V]&&!e[X])},Z=function(t){return!y(t)&&"object"===e(t)&&!Y(t)},ee=function(e){return i({},V,Object.keys(e).map((function(t){return i({},t,e[t])})))},te=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=c({},x,{},r),this._keyStore=new b(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof w))throw new Error("Incorrect `index` type");this._myIndex=t||O(this._keyStore.keys(),this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){m(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return ne(u,this._keyStore),a&&u.sort(s),p(r)&&r>-1&&(u=u.slice(0,r)),re(u,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=Q(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(m(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n);if(r.length>1&&!Y(n))return e(ee(n));var o=r[0];if(Z(n)){var c=n[o];if(!g(c))throw new Error('Invalid value for key "'.concat(o,'"'));var a={key:o,pattern:c};return i&&(a.searcher=Q(c,t)),a}var s={children:[],operator:o};return r.forEach((function(t){var r=n[t];y(r)&&r.forEach((function(t){s.children.push(e(t))}))})),s};return Y(e)||(e=ee(e)),o(e)}(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c={},a=[];return o.forEach((function(e){var r=e.$,o=e.i;m(r)&&function e(n,r,o){if(!n.children){var s=n.key,u=n.searcher,h=r[i.indexOf(s)];return t._findMatches({key:s,value:h,searcher:u})}for(var f=n.operator,l=[],v=0;v<n.children.length;v+=1){var y=e(n.children[v],r,o);if(y&&y.length){if(l.push({idx:o,item:r,matches:y}),f===X)break}else if(f===V){l.length=0;break}}l.length&&(c[o]||(c[o]={idx:o,item:r,matches:[]},a.push(c[o])),l.forEach((function(e){var t,n=e.matches;(t=c[o].matches).push.apply(t,d(n))})))}(n,r,o)})),a}},{key:"_searchObjectList",value:function(e){var t=this,n=Q(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c=[];return o.forEach((function(e){var r=e.$,o=e.i;if(m(r)){var a=[];i.forEach((function(e,i){a.push.apply(a,d(t._findMatches({key:e,value:r[i],searcher:n})))})),a.length&&c.push({idx:o,item:r,matches:a})}})),c}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!m(n))return[];var i=[];if(y(n))n.forEach((function(e){var n=e.v,o=e.i,c=e.n;if(m(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}}));else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}]),e}();function ne(e,t){e.forEach((function(e){var n=1;e.matches.forEach((function(e){var r=e.key,i=e.norm,o=e.score,c=t.get(r,"weight");n*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*i)})),e.score=n}))}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?x.includeMatches:r,o=n.includeScore,c=void 0===o?x.includeScore:o,a=[];return i&&a.push(C),c&&a.push(A),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}return te.version="6.0.0-beta.1",te.createIndex=O,te.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?x.getFn:n,i=e.keys,o=e.records,c=new w({getFn:r});return c.setKeys(i),c.setRecords(o),c},te.config=x,function(){H.push.apply(H,arguments)}(G),te},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t();

@@ -16,3 +16,3 @@ {

],
"version": "6.0.0-beta.0",
"version": "6.0.0-beta.1",
"description": "Lightweight fuzzy-search",

@@ -19,0 +19,0 @@ "license": "Apache-2.0",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc