mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-09-02 18:33:17 +02:00
ADD v0.2.70
This commit is contained in:
@@ -48,8 +48,6 @@ var parameter = (function(opt){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log(parameter);
|
|
||||||
|
|
||||||
return parameter;
|
return parameter;
|
||||||
})({
|
})({
|
||||||
|
|
||||||
@@ -57,6 +55,7 @@ var parameter = (function(opt){
|
|||||||
use_types_for_optimization: true,
|
use_types_for_optimization: true,
|
||||||
new_type_inf: true,
|
new_type_inf: true,
|
||||||
jscomp_warning: "newCheckTypes",
|
jscomp_warning: "newCheckTypes",
|
||||||
|
//jscomp_error: "strictCheckTypes",
|
||||||
generate_exports: true,
|
generate_exports: true,
|
||||||
export_local_property_definitions: true,
|
export_local_property_definitions: true,
|
||||||
language_in: "ECMASCRIPT5_STRICT",
|
language_in: "ECMASCRIPT5_STRICT",
|
||||||
|
349
flexsearch.js
349
flexsearch.js
@@ -1,5 +1,5 @@
|
|||||||
;/**!
|
;/**!
|
||||||
* @preserve FlexSearch v0.2.68
|
* @preserve FlexSearch v0.2.70
|
||||||
* Copyright 2018 Thomas Wilkerling
|
* Copyright 2018 Thomas Wilkerling
|
||||||
* Released under the Apache 2.0 Licence
|
* Released under the Apache 2.0 Licence
|
||||||
* https://github.com/nextapps-de/flexsearch
|
* https://github.com/nextapps-de/flexsearch
|
||||||
@@ -290,162 +290,159 @@ var SUPPORT_ASYNC = true;
|
|||||||
/** @type {Array} */
|
/** @type {Array} */
|
||||||
this._matcher = [];
|
this._matcher = [];
|
||||||
|
|
||||||
//if(options){
|
options || (options = defaults);
|
||||||
|
|
||||||
options || (options = defaults);
|
var custom = /** @type {?string} */ (options["profile"]);
|
||||||
|
var profile = custom && !indexBlacklist[custom] ? profiles[custom] : createObject();
|
||||||
|
|
||||||
var custom = options["profile"];
|
// initialize worker
|
||||||
var profile = custom && !indexBlacklist[/** @type {string} */ (custom)] ? profiles[custom] : createObject();
|
|
||||||
|
|
||||||
// initialize worker
|
if(SUPPORT_WORKER && (custom = options["worker"])){
|
||||||
|
|
||||||
if(SUPPORT_WORKER && (custom = options["worker"])){
|
if(Worker){
|
||||||
|
|
||||||
if(typeof Worker === "undefined"){
|
var self = this;
|
||||||
|
var threads = parseInt(custom, 10) || 4;
|
||||||
|
|
||||||
options["worker"] = false;
|
self._currentTask = -1;
|
||||||
|
self._taskCompleted = 0;
|
||||||
|
self._taskResult = [];
|
||||||
|
self._currentCallback = null;
|
||||||
|
//self._ids_count = new Array(threads);
|
||||||
|
self._worker = new Array(threads);
|
||||||
|
|
||||||
// if(SUPPORT_ASYNC){
|
for(var i = 0; i < threads; i++){
|
||||||
//
|
|
||||||
// options["async"] = true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
this._worker = null;
|
//self._ids_count[i] = 0;
|
||||||
}
|
|
||||||
else{
|
|
||||||
|
|
||||||
var self = this;
|
self._worker[i] = addWorker(self.id, i, options /*|| defaults*/, function(id, query, result, limit){
|
||||||
var threads = parseInt(custom, 10) || 4;
|
|
||||||
|
|
||||||
self._currentTask = -1;
|
if(self._taskCompleted === self.worker){
|
||||||
self._taskCompleted = 0;
|
|
||||||
self._taskResult = [];
|
|
||||||
self._currentCallback = null;
|
|
||||||
//self._ids_count = new Array(threads);
|
|
||||||
self._worker = new Array(threads);
|
|
||||||
|
|
||||||
for(var i = 0; i < threads; i++){
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//self._ids_count[i] = 0;
|
self._taskResult = self._taskResult.concat(result);
|
||||||
|
self._taskCompleted++;
|
||||||
|
|
||||||
self._worker[i] = addWorker(self.id, i, options /*|| defaults*/, function(id, query, result, limit){
|
if(limit && (self._taskResult.length >= limit)){
|
||||||
|
|
||||||
if(self._taskCompleted === self.worker){
|
self._taskCompleted = self.worker;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
if(self._currentCallback && (self._taskCompleted === self.worker)){
|
||||||
|
|
||||||
|
// store result to cache
|
||||||
|
// TODO: add worker cache, may remove global cache
|
||||||
|
|
||||||
|
if(self.cache){
|
||||||
|
|
||||||
|
self._cache.set(query, self._taskResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
self._taskResult = self._taskResult.concat(result);
|
self._currentCallback(self._taskResult);
|
||||||
self._taskCompleted++;
|
self._taskResult = [];
|
||||||
|
}
|
||||||
|
|
||||||
if(limit && (self._taskResult.length >= limit)){
|
return self;
|
||||||
|
});
|
||||||
self._taskCompleted = self.worker;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(self._currentCallback && (self._taskCompleted === self.worker)){
|
|
||||||
|
|
||||||
// store result to cache
|
|
||||||
// TODO: add worker cache, may remove global cache
|
|
||||||
|
|
||||||
if(self.cache){
|
|
||||||
|
|
||||||
self._cache.set(query, self._taskResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
self._currentCallback(self._taskResult);
|
|
||||||
self._taskResult = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
return self;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
// apply custom options
|
options["worker"] = false;
|
||||||
|
|
||||||
this.mode = (
|
// if(SUPPORT_ASYNC){
|
||||||
|
//
|
||||||
|
// options["async"] = true;
|
||||||
|
// }
|
||||||
|
|
||||||
options["mode"] ||
|
this._worker = null;
|
||||||
profile.mode ||
|
|
||||||
this.mode ||
|
|
||||||
defaults.mode
|
|
||||||
);
|
|
||||||
|
|
||||||
if(SUPPORT_ASYNC) this.async = (
|
|
||||||
|
|
||||||
options["async"] ||
|
|
||||||
this.async ||
|
|
||||||
defaults.async
|
|
||||||
);
|
|
||||||
|
|
||||||
if(SUPPORT_WORKER) this.worker = (
|
|
||||||
|
|
||||||
options["worker"] ||
|
|
||||||
this.worker ||
|
|
||||||
defaults.worker
|
|
||||||
);
|
|
||||||
|
|
||||||
this.threshold = (
|
|
||||||
|
|
||||||
options["threshold"] ||
|
|
||||||
profile.threshold ||
|
|
||||||
this.threshold ||
|
|
||||||
defaults.threshold
|
|
||||||
);
|
|
||||||
|
|
||||||
this.depth = (
|
|
||||||
|
|
||||||
options["depth"] ||
|
|
||||||
profile.depth ||
|
|
||||||
this.depth ||
|
|
||||||
defaults.depth
|
|
||||||
);
|
|
||||||
|
|
||||||
this.suggest = (
|
|
||||||
|
|
||||||
options["suggest"] ||
|
|
||||||
this.suggest ||
|
|
||||||
defaults.suggest
|
|
||||||
);
|
|
||||||
|
|
||||||
custom = options["encode"] || profile.encode;
|
|
||||||
|
|
||||||
this.encoder = (
|
|
||||||
|
|
||||||
(custom && !indexBlacklist[custom] && globalEncoder[custom]) ||
|
|
||||||
(typeof custom === "function" ? custom : this.encoder || false)
|
|
||||||
);
|
|
||||||
|
|
||||||
if(SUPPORT_DEBUG){
|
|
||||||
|
|
||||||
this.debug = (
|
|
||||||
|
|
||||||
options["debug"] ||
|
|
||||||
this.debug
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(custom = options["matcher"]) {
|
// apply custom options
|
||||||
|
|
||||||
this.addMatcher(
|
this.mode = (
|
||||||
|
|
||||||
/** @type {Object<string, string>} */
|
options["mode"] ||
|
||||||
(custom)
|
profile.mode ||
|
||||||
);
|
this.mode ||
|
||||||
}
|
defaults.mode
|
||||||
|
);
|
||||||
|
|
||||||
if((custom = options["filter"]) && !indexBlacklist[/** @type {string} */ (custom)]) {
|
if(SUPPORT_ASYNC) this.async = (
|
||||||
|
|
||||||
this.filter = initFilter(filter[custom] || custom, this.encoder);
|
options["async"] ||
|
||||||
}
|
this.async ||
|
||||||
|
defaults.async
|
||||||
|
);
|
||||||
|
|
||||||
if((custom = options["stemmer"]) && !indexBlacklist[/** @type {string} */ (custom)]) {
|
if(SUPPORT_WORKER) this.worker = (
|
||||||
|
|
||||||
this.stemmer = initStemmer(stemmer[custom] || custom, this.encoder);
|
options["worker"] ||
|
||||||
}
|
this.worker ||
|
||||||
//}
|
defaults.worker
|
||||||
|
);
|
||||||
|
|
||||||
|
this.threshold = (
|
||||||
|
|
||||||
|
options["threshold"] ||
|
||||||
|
profile.threshold ||
|
||||||
|
this.threshold ||
|
||||||
|
defaults.threshold
|
||||||
|
);
|
||||||
|
|
||||||
|
this.depth = (
|
||||||
|
|
||||||
|
options["depth"] ||
|
||||||
|
profile.depth ||
|
||||||
|
this.depth ||
|
||||||
|
defaults.depth
|
||||||
|
);
|
||||||
|
|
||||||
|
this.suggest = (
|
||||||
|
|
||||||
|
options["suggest"] ||
|
||||||
|
this.suggest ||
|
||||||
|
defaults.suggest
|
||||||
|
);
|
||||||
|
|
||||||
|
custom = options["encode"] || profile.encode;
|
||||||
|
|
||||||
|
this.encoder = (
|
||||||
|
|
||||||
|
(custom && !indexBlacklist[custom] && globalEncoder[custom]) ||
|
||||||
|
(typeof custom === "function" ? custom : this.encoder || false)
|
||||||
|
);
|
||||||
|
|
||||||
|
if(SUPPORT_DEBUG){
|
||||||
|
|
||||||
|
this.debug = (
|
||||||
|
|
||||||
|
options["debug"] ||
|
||||||
|
this.debug
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(custom = options["matcher"]) {
|
||||||
|
|
||||||
|
this.addMatcher(
|
||||||
|
|
||||||
|
/** @type {Object<string, string>} */
|
||||||
|
(custom)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((custom = options["filter"]) /*&& !indexBlacklist[custom]*/) {
|
||||||
|
|
||||||
|
this.filter = initFilter(filter[custom] || custom, this.encoder);
|
||||||
|
}
|
||||||
|
|
||||||
|
if((custom = options["stemmer"]) /*&& !indexBlacklist[custom]*/) {
|
||||||
|
|
||||||
|
this.stemmer = initStemmer(stemmer[custom] || custom, this.encoder);
|
||||||
|
}
|
||||||
|
|
||||||
// initialize primary index
|
// initialize primary index
|
||||||
|
|
||||||
@@ -902,7 +899,7 @@ var SUPPORT_ASYNC = true;
|
|||||||
var threshold;
|
var threshold;
|
||||||
var result = [];
|
var result = [];
|
||||||
|
|
||||||
if(query && (typeof query === "object")){
|
if(typeof query === "object"){
|
||||||
|
|
||||||
// re-assign properties
|
// re-assign properties
|
||||||
|
|
||||||
@@ -912,16 +909,16 @@ var SUPPORT_ASYNC = true;
|
|||||||
query = query["query"];
|
query = query["query"];
|
||||||
}
|
}
|
||||||
|
|
||||||
threshold = (threshold || this.threshold || 0) | 0;
|
threshold || (threshold = this.threshold || 0);
|
||||||
|
|
||||||
if(typeof limit === "function"){
|
if(typeof limit === "function"){
|
||||||
|
|
||||||
callback = limit;
|
callback = limit;
|
||||||
limit = 1000;
|
limit = 1000;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
|
|
||||||
limit || (limit = 1000);
|
limit || (limit === 0 ) || (limit = 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SUPPORT_WORKER && this.worker){
|
if(SUPPORT_WORKER && this.worker){
|
||||||
@@ -1066,11 +1063,11 @@ var SUPPORT_ASYNC = true;
|
|||||||
:
|
:
|
||||||
this._map
|
this._map
|
||||||
|
|
||||||
)[z][value];
|
)[z];
|
||||||
|
|
||||||
if(map){
|
if(map[value]){
|
||||||
|
|
||||||
mapCheck[count++] = map;
|
mapCheck[count++] = map[value];
|
||||||
mapFound = true;
|
mapFound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1675,14 +1672,13 @@ var SUPPORT_ASYNC = true;
|
|||||||
|
|
||||||
function addIndex(map, dupes, tmp, id, partialScore, contextScore, threshold){
|
function addIndex(map, dupes, tmp, id, partialScore, contextScore, threshold){
|
||||||
|
|
||||||
if(typeof dupes[tmp] === "undefined"){
|
if(!dupes[tmp]){
|
||||||
|
|
||||||
var score = (
|
var score = (
|
||||||
|
|
||||||
partialScore ?
|
partialScore ?
|
||||||
|
|
||||||
((9 - (threshold || 6)) * contextScore) + ((threshold || 6) * partialScore)
|
((9 - (threshold || 6)) * contextScore) + ((threshold || 6) * partialScore)
|
||||||
// calcScore(tmp, content)
|
|
||||||
:
|
:
|
||||||
contextScore
|
contextScore
|
||||||
);
|
);
|
||||||
@@ -1696,30 +1692,15 @@ var SUPPORT_ASYNC = true;
|
|||||||
|
|
||||||
arr[arr.length] = id;
|
arr[arr.length] = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return score;
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
return score || dupes[tmp];
|
return dupes[tmp];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {!string} part
|
|
||||||
* @param {!string} ref
|
|
||||||
* @returns {number}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
function calcScore(part, ref){
|
|
||||||
|
|
||||||
var contextIndex = ref.indexOf(part);
|
|
||||||
var partial_index = contextIndex - ref.lastIndexOf(" ", contextIndex);
|
|
||||||
|
|
||||||
return (
|
|
||||||
|
|
||||||
(3 / ref.length * (ref.length - contextIndex)) + (6 / partial_index)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} map
|
* @param {Object} map
|
||||||
* @param {string|number} id
|
* @param {string|number} id
|
||||||
@@ -2082,32 +2063,47 @@ var SUPPORT_ASYNC = true;
|
|||||||
|
|
||||||
while(i < length){
|
while(i < length){
|
||||||
|
|
||||||
var checkVal = check[tmp = arr[++i]];
|
tmp = arr[++i];
|
||||||
|
|
||||||
if(checkVal === z){
|
if(check[tmp]){
|
||||||
|
|
||||||
// fill in during last round
|
var checkVal = check[tmp];
|
||||||
|
|
||||||
if(isFinalLoop){
|
if(checkVal === z){
|
||||||
|
|
||||||
result[count++] = tmp;
|
// fill in during last round
|
||||||
|
|
||||||
if(limit && (count === limit)){
|
if(isFinalLoop){
|
||||||
|
|
||||||
return result;
|
result[count++] = tmp;
|
||||||
|
|
||||||
|
if(limit && (count === limit)){
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
check[tmp] = z + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// apply count status
|
||||||
|
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
|
else if(suggest){
|
||||||
|
|
||||||
// apply count status
|
var currentSuggestion = (
|
||||||
|
|
||||||
found = true;
|
suggestions[checkVal] ?
|
||||||
check[tmp] = z + 1;
|
|
||||||
}
|
|
||||||
else if(suggest){
|
|
||||||
|
|
||||||
var currentSuggestion = suggestions[checkVal] || (suggestions[checkVal] = []);
|
suggestions[checkVal]
|
||||||
|
:
|
||||||
|
suggestions[checkVal] = []
|
||||||
|
);
|
||||||
|
|
||||||
currentSuggestion[currentSuggestion.length] = tmp;
|
currentSuggestion[currentSuggestion.length] = tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2121,11 +2117,10 @@ var SUPPORT_ASYNC = true;
|
|||||||
|
|
||||||
if(suggest){
|
if(suggest){
|
||||||
|
|
||||||
limit || (limit = 1000);
|
|
||||||
count = result.length;
|
count = result.length;
|
||||||
length = suggestions.length;
|
length = suggestions.length;
|
||||||
|
|
||||||
if((count < limit) && length){
|
if(length && (!limit || (count < limit))){
|
||||||
|
|
||||||
for(z = length - 1; z >= 0; z--){
|
for(z = length - 1; z >= 0; z--){
|
||||||
|
|
||||||
@@ -2424,14 +2419,6 @@ var SUPPORT_ASYNC = true;
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {Function}
|
|
||||||
* @const
|
|
||||||
* @final
|
|
||||||
*/
|
|
||||||
|
|
||||||
//var emptyObject = new Function("var o={};o.__proto__=null;return o;");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://jsperf.com/comparison-object-index-type
|
* https://jsperf.com/comparison-object-index-type
|
||||||
* @param {number=} count
|
* @param {number=} count
|
||||||
@@ -2446,14 +2433,14 @@ var SUPPORT_ASYNC = true;
|
|||||||
|
|
||||||
for(var i = 0; i < count; i++){
|
for(var i = 0; i < count; i++){
|
||||||
|
|
||||||
array[i] = createObject();
|
array[i] = Object.create(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
return Object.create(null); //emptyObject();
|
return Object.create(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,20 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
FlexSearch v0.2.68
|
FlexSearch v0.2.70
|
||||||
Copyright 2018 Thomas Wilkerling
|
Copyright 2018 Thomas Wilkerling
|
||||||
Released under the Apache 2.0 Licence
|
Released under the Apache 2.0 Licence
|
||||||
https://github.com/nextapps-de/flexsearch
|
https://github.com/nextapps-de/flexsearch
|
||||||
*/
|
*/
|
||||||
'use strict';(function(d,x,p){var t;(t=p.define)&&t.amd?t([],function(){return x}):(t=p.modules)?t[d.toLowerCase()]=x:"undefined"!==typeof module?module.exports=x:p[d]=x})("FlexSearch",function(){function d(a){"string"!==typeof a||v[a]||(a=D[a]);a||(a=y);this.id=a.id||I++;this.init(a);x(this,"index",function(){return this.a});x(this,"length",function(){return Object.keys(this.a).length})}function x(a,b,c){Object.defineProperty(a,b,{get:c})}function p(a){return new RegExp(a,"g")}function t(a,b,c){if("undefined"===
|
'use strict';(function(d,x,p){var t;(t=p.define)&&t.amd?t([],function(){return x}):(t=p.modules)?t[d.toLowerCase()]=x:"undefined"!==typeof module?module.exports=x:p[d]=x})("FlexSearch",function(){function d(a){"string"!==typeof a||v[a]||(a=D[a]);a||(a=y);this.id=a.id||I++;this.init(a);x(this,"index",function(){return this.a});x(this,"length",function(){return Object.keys(this.a).length})}function x(a,b,c){Object.defineProperty(a,b,{get:c})}function p(a){return new RegExp(a,"g")}function t(a,b,c){if("undefined"===
|
||||||
typeof c){for(c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}return a.replace(b,c)}function A(a,b,c,e,m,k,f){if("undefined"===typeof b[c]){var g=m?(9-(f||6))*k+(f||6)*m:k;b[c]=g;g>=f&&(a=a[g+.5|0],a=a[c]||(a[c]=[]),a[a.length]=e)}return g||b[c]}function B(a,b){if(a)for(var c=Object.keys(a),e=0,m=c.length;e<m;e++){var k=c[e],f=a[k];if(f)for(var g=0,h=f.length;g<h;g++)if(f[g]===b){1===h?delete a[k]:f.splice(g,1);break}else"object"===typeof f[g]&&B(f[g],b)}}function E(a){var b=[];if(!a)return b;
|
typeof c){for(c=0;c<b.length;c+=2)a=a.replace(b[c],b[c+1]);return a}return a.replace(b,c)}function A(a,b,c,e,f,q,g){if(b[c])return b[c];f=f?(9-(g||6))*q+(g||6)*f:q;b[c]=f;f>=g&&(a=a[f+.5|0],a=a[c]||(a[c]=[]),a[a.length]=e);return f}function B(a,b){if(a)for(var c=Object.keys(a),e=0,f=c.length;e<f;e++){var q=c[e],g=a[q];if(g)for(var l=0,h=g.length;l<h;l++)if(g[l]===b){1===h?delete a[q]:g.splice(l,1);break}else"object"===typeof g[l]&&B(g[l],b)}}function E(a){var b=[];if(!a)return b;for(var c=0,e=0,f=
|
||||||
for(var c=0,e=0,m=0,k="",f=a.length,g=0;g<f;g++){var h=a[g];"a"===h||"e"===h||"i"===h||"o"===h||"u"===h||"y"===h?c++:e++;" "!==h&&(k+=h);if(" "===h||c>=(8<f?2:1)&&2<=e||2<=c&&e>=(8<f?2:1)||g===f-1)k&&(b[m]&&2<k.length&&m++,b[m]=b[m]?b[m]+k:k," "===h&&m++,k=""),e=c=0}return b}function J(a,b){a=a.length-b.length;return 0>a?1:0<a?-1:0}function K(a,b){a=a.length-b.length;return 0>a?-1:0<a?1:0}function L(a,b,c){var e=[],m=[],k=a.length;if(1<k){a.sort(K);for(var f=u(),g=a[0],h=g.length,z=0;z<h;)f[g[z++]]=
|
0,q="",g=a.length,l=0;l<g;l++){var h=a[l];"a"===h||"e"===h||"i"===h||"o"===h||"u"===h||"y"===h?c++:e++;" "!==h&&(q+=h);if(" "===h||c>=(8<g?2:1)&&2<=e||2<=c&&e>=(8<g?2:1)||l===g-1)q&&(b[f]&&2<q.length&&f++,b[f]=b[f]?b[f]+q:q," "===h&&f++,q=""),e=c=0}return b}function J(a,b){a=a.length-b.length;return 0>a?1:0<a?-1:0}function K(a,b){a=a.length-b.length;return 0>a?-1:0<a?1:0}function L(a,b,c){var e=[],f=[],q=a.length;if(1<q){a.sort(K);for(var g=u(),l=a[0],h=l.length,z=0;z<h;)g[l[z++]]=1;for(var m,d=0,
|
||||||
1;for(var q,d=0,n=1;n<k;){var l=!1,p=n===k-1;m=[];g=a[n];h=g.length;for(z=-1;z<h;){var r=f[q=g[++z]];if(r===n){if(p&&(e[d++]=q,b&&d===b))return e;l=!0;f[q]=n+1}else c&&(r=m[r]||(m[r]=[]),r[r.length]=q)}if(!l&&!c)break;n++}if(c&&(b||(b=1E3),d=e.length,h=m.length,d<b&&h))for(n=h-1;0<=n;n--)if(q=m[n])for(z=0;z<q.length;z++)if(e[d++]=q[z],b&&d===b)return e}else k&&(e=a[0],b&&e.length>b&&(e=e.slice(0,b)));return e}function u(a){if(a){for(var b=Array(a),c=0;c<a;c++)b[c]=u();return b}return Object.create(null)}
|
n=1;n<q;){var k=!1,p=n===q-1;f=[];l=a[n];h=l.length;for(z=-1;z<h;)if(m=l[++z],g[m]){var r=g[m];if(r===n){if(p){if(e[d++]=m,b&&d===b)return e}else g[m]=n+1;k=!0}else c&&(r=f[r]?f[r]:f[r]=[],r[r.length]=m)}if(!k&&!c)break;n++}if(c&&(d=e.length,(h=f.length)&&(!b||d<b)))for(n=h-1;0<=n;n--)if(m=f[n])for(z=0;z<m.length;z++)if(e[d++]=m[z],b&&d===b)return e}else q&&(e=a[0],b&&e.length>b&&(e=e.slice(0,b)));return e}function u(a){if(a){for(var b=Array(a),c=0;c<a;c++)b[c]=Object.create(null);return b}return Object.create(null)}
|
||||||
var y={encode:"icase",mode:"forward",f:!1,cache:!1,async:!1,i:!1,threshold:0,depth:0},D={memory:{encode:"extra",mode:"strict",threshold:7},speed:{encode:"icase",mode:"strict",threshold:7,depth:2},match:{encode:"extra",mode:"full"},score:{encode:"extra",mode:"strict",threshold:5,depth:4},balance:{encode:"balance",mode:"ngram",threshold:6,depth:3},fastest:{encode:"icase",mode:"strict",threshold:9,depth:1}},C=[],I=0,F=p("[ -/]"),G=u(),H=u(),v=function(){for(var a=Object.getOwnPropertyNames({}.__proto__),
|
var y={encode:"icase",mode:"forward",f:!1,cache:!1,async:!1,i:!1,threshold:0,depth:0},D={memory:{encode:"extra",mode:"strict",threshold:7},speed:{encode:"icase",mode:"strict",threshold:7,depth:2},match:{encode:"extra",mode:"full"},score:{encode:"extra",mode:"strict",threshold:5,depth:4},balance:{encode:"balance",mode:"ngram",threshold:6,depth:3},fastest:{encode:"icase",mode:"strict",threshold:9,depth:1}},C=[],I=0,F=p("[ -/]"),G=u(),H=u(),v=function(){for(var a=Object.getOwnPropertyNames({}.__proto__),
|
||||||
b=u(),c=0;c<a.length;c++)b[a[c]]=1;return b}();d.new=function(a){return new this(a)};d.create=function(a){return d.new(a)};d.registerMatcher=function(a){for(var b in a)a.hasOwnProperty(b)&&C.push(p(b),a[b]);return this};d.registerEncoder=function(a,b){v[a]||(w[a]=b);return this};d.registerLanguage=function(a,b){v[a]||(G[a]=b.filter,H[a]=b.stemmer);return this};d.encode=function(a,b){return v[a]?b:w[a].call(w,b)};d.prototype.init=function(a){this.h=[];a||(a=y);var b=a.profile;b=b&&!v[b]?D[b]:u();this.mode=
|
b=u(),c=0;c<a.length;c++)b[a[c]]=1;return b}();d.new=function(a){return new this(a)};d.create=function(a){return d.new(a)};d.registerMatcher=function(a){for(var b in a)a.hasOwnProperty(b)&&C.push(p(b),a[b]);return this};d.registerEncoder=function(a,b){v[a]||(w[a]=b);return this};d.registerLanguage=function(a,b){v[a]||(G[a]=b.filter,H[a]=b.stemmer);return this};d.encode=function(a,b){return v[a]?b:w[a].call(w,b)};d.prototype.init=function(a){this.h=[];a||(a=y);var b=a.profile;b=b&&!v[b]?D[b]:u();this.mode=
|
||||||
a.mode||b.mode||this.mode||y.mode;this.threshold=a.threshold||b.threshold||this.threshold||y.threshold;this.depth=a.depth||b.depth||this.depth||y.depth;this.f=a.suggest||this.f||y.f;this.c=(b=a.encode||b.encode)&&!v[b]&&w[b]||("function"===typeof b?b:this.c||!1);(b=a.matcher)&&this.addMatcher(b);if((b=a.filter)&&!v[b]){var c=G[b]||b,e=this.c,m=u();if(c)for(var k=0;k<c.length;k++){var f=e?e.call(w,c[k]):c[k];m[f]=String.fromCharCode(65E3-c.length+k)}this.filter=m}if((b=a.stemmer)&&!v[b]){a=H[b]||b;
|
a.mode||b.mode||this.mode||y.mode;this.threshold=a.threshold||b.threshold||this.threshold||y.threshold;this.depth=a.depth||b.depth||this.depth||y.depth;this.f=a.suggest||this.f||y.f;this.c=(b=a.encode||b.encode)&&!v[b]&&w[b]||("function"===typeof b?b:this.c||!1);(b=a.matcher)&&this.addMatcher(b);if(b=a.filter){b=G[b]||b;var c=this.c,e=u();if(b)for(var f=0;f<b.length;f++){var q=c?c.call(w,b[f]):b[f];e[q]=String.fromCharCode(65E3-b.length+f)}this.filter=e}if(b=a.stemmer){a=H[b]||b;b=this.c;c=[];if(a)for(var g in a)a.hasOwnProperty(g)&&
|
||||||
b=this.c;c=[];if(a)for(var g in a)a.hasOwnProperty(g)&&(e=b?b.call(w,g):g,c.push(p("(?=.{"+(e.length+3)+",})"+e+"$"),b?b.call(w,a[g]):a[g]));this.stemmer=c}this.g=u(10);this.b=u();this.a=u();u();return this};d.prototype.encode=function(a){a&&C.length&&(a=t(a,C));a&&this.h.length&&(a=t(a,this.h));a&&this.c&&(a=this.c.call(w,a));a&&this.stemmer&&(a=t(a,this.stemmer));return a};d.prototype.addMatcher=function(a){var b=this.h,c;for(c in a)a.hasOwnProperty(c)&&b.push(p(c),a[c]);return this};d.prototype.add=
|
(e=b?b.call(w,g):g,c.push(p("(?=.{"+(e.length+3)+",})"+e+"$"),b?b.call(w,a[g]):a[g]));this.stemmer=c}this.g=u(10);this.b=u();this.a=u();u();return this};d.prototype.encode=function(a){a&&C.length&&(a=t(a,C));a&&this.h.length&&(a=t(a,this.h));a&&this.c&&(a=this.c.call(w,a));a&&this.stemmer&&(a=t(a,this.stemmer));return a};d.prototype.addMatcher=function(a){var b=this.h,c;for(c in a)a.hasOwnProperty(c)&&b.push(p(c),a[c]);return this};d.prototype.add=function(a,b,c){if("string"===typeof b&&b&&(a&&!v[a]||
|
||||||
function(a,b,c){if("string"===typeof b&&b&&(a&&!v[a]||0===a))if(this.a[a]&&!c)this.update(a,b);else{b=this.encode(b);if(!b.length)return this;c=this.mode;b="function"===typeof c?c(b):"ngram"===c?E(b):b.split(F);var e=u();e._ctx=u();for(var m=this.threshold,k=this.depth,f=this.g,g=b.length,h=0;h<g;h++){var d=b[h];if(d){var q=d.length,p=(g-h)/g;switch(c){case "reverse":case "both":for(var n="",l=q-1;1<=l;l--)n=d[l]+n,A(f,e,n,a,(q-l)/q,p,m);case "forward":n="";for(l=0;l<q;l++)n+=d[l],A(f,e,n,a,1,p,m);
|
0===a))if(this.a[a]&&!c)this.update(a,b);else{b=this.encode(b);if(!b.length)return this;c=this.mode;b="function"===typeof c?c(b):"ngram"===c?E(b):b.split(F);var e=u();e._ctx=u();for(var f=this.threshold,q=this.depth,g=this.g,l=b.length,h=0;h<l;h++){var d=b[h];if(d){var m=d.length,p=(l-h)/l;switch(c){case "reverse":case "both":for(var n="",k=m-1;1<=k;k--)n=d[k]+n,A(g,e,n,a,(m-k)/m,p,f);case "forward":n="";for(k=0;k<m;k++)n+=d[k],A(g,e,n,a,1,p,f);break;case "full":for(k=0;k<m;k++)for(var t=(m-k)/m,
|
||||||
break;case "full":for(l=0;l<q;l++)for(var t=(q-l)/q,r=q;r>l;r--)n=d.substring(l,r),A(f,e,n,a,t,p,m);break;default:if(l=A(f,e,d,a,1,p,m),k&&1<g&&l>=m)for(q=e._ctx[d]||(e._ctx[d]=u()),d=this.b[d]||(this.b[d]=u(10)),l=h-k,r=h+k+1,0>l&&(l=0),r>g&&(r=g);l<r;l++)l!==h&&A(d,q,b[l],a,0,10-(l<h?h-l:l-h),m)}}}this.a[a]="1"}return this};d.prototype.update=function(a,b){this.a[a]&&b&&"string"===typeof b&&(this.remove(a),this.add(a,b,!0));return this};d.prototype.remove=function(a){if(this.a[a]&&!v[a]){for(var b=
|
r=m;r>k;r--)n=d.substring(k,r),A(g,e,n,a,t,p,f);break;default:if(k=A(g,e,d,a,1,p,f),q&&1<l&&k>=f)for(m=e._ctx[d]||(e._ctx[d]=u()),d=this.b[d]||(this.b[d]=u(10)),k=h-q,r=h+q+1,0>k&&(k=0),r>l&&(r=l);k<r;k++)k!==h&&A(d,m,b[k],a,0,10-(k<h?h-k:k-h),f)}}}this.a[a]="1"}return this};d.prototype.update=function(a,b){this.a[a]&&b&&"string"===typeof b&&(this.remove(a),this.add(a,b,!0));return this};d.prototype.remove=function(a){if(this.a[a]&&!v[a]){for(var b=0;10>b;b++)B(this.g[b],a);this.depth&&B(this.b,a);
|
||||||
0;10>b;b++)B(this.g[b],a);this.depth&&B(this.b,a);delete this.a[a]}return this};d.prototype.search=function(a,b,c){var e=[];if(a&&"object"===typeof a){c=a.callback||b;b=a.limit;var m=a.threshold;a=a.query}m=(m||this.threshold||0)|0;"function"===typeof b?(c=b,b=1E3):b||(b=1E3);if(c){var d=this;M(function(){c(d.search(a,b));d=null},1,"search-"+this.id);return null}if(!a||"string"!==typeof a)return e;var f=this.encode(a);if(!f.length)return e;var g=this.mode;f="function"===typeof g?g(f):"ngram"===g?
|
delete this.a[a]}return this};d.prototype.search=function(a,b,c){var e=[];if("object"===typeof a){c=a.callback||b;b=a.limit;var f=a.threshold;a=a.query}f||(f=this.threshold||0);"function"===typeof b?(c=b,b=1E3):b||0===b||(b=1E3);if(c){var d=this;M(function(){c(d.search(a,b));d=null},1,"search-"+this.id);return null}if(!a||"string"!==typeof a)return e;var g=this.encode(a);if(!g.length)return e;var l=this.mode;g="function"===typeof l?l(g):"ngram"===l?E(g):g.split(F);l=g.length;var h=!0,p=[],m=u();if(1<
|
||||||
E(f):f.split(F);g=f.length;var h=!0,p=[],q=u();if(1<g)if(this.depth){var t=!0,n=f[0];q[n]="1"}else f.sort(J);var l;if(!t||(l=this.b)[n])for(var v=t?1:0;v<g;v++){var r=f[v];if(r&&!q[r]){for(var w,x=!1,y=[],A=0,B=9;B>=m;B--)if(w=(t?l[n]:this.g)[B][r])y[A++]=w,x=!0;if(x)p[p.length]=1<A?p.concat.apply([],y):y[0];else if(!this.f){h=!1;break}q[r]="1"}n=r}else h=!1;h&&(e=L(p,b,this.f));return e};d.prototype.reset=function(){this.destroy();return this.init()};d.prototype.destroy=function(){this.filter=this.stemmer=
|
l)if(this.depth){var t=!0,n=g[0];m[n]="1"}else g.sort(J);var k;if(!t||(k=this.b)[n])for(var v=t?1:0;v<l;v++){var r=g[v];if(r&&!m[r]){for(var w,x=!1,y=[],A=0,B=9;B>=f;B--)w=(t?k[n]:this.g)[B],w[r]&&(y[A++]=w[r],x=!0);if(x)p[p.length]=1<A?p.concat.apply([],y):y[0];else if(!this.f){h=!1;break}m[r]="1"}n=r}else h=!1;h&&(e=L(p,b,this.f));return e};d.prototype.reset=function(){this.destroy();return this.init()};d.prototype.destroy=function(){this.filter=this.stemmer=this.g=this.b=this.a=null;return this};
|
||||||
this.g=this.b=this.a=null;return this};var w=Object.create({icase:function(a){return a.toLowerCase()},balance:function(){var a=[p("[-/]")," ",p("[^a-z0-9 ]"),"",p("\\s\\s+")," "];return function(b){b=t(b.toLowerCase(),a);for(var c="",e="",d="",k=0;k<b.length;k++){var f=b[k];if(f!==e)if(k&&"h"===f){if(d="a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d,("a"===e||"e"===e||"i"===e||"o"===e||"u"===e||"y"===e)&&d||" "===e)c+=f}else c+=f;d=k===b.length-1?"":b[k+1];e=f}return c}}()}),M=null;return d}(!1),
|
var w=Object.create({icase:function(a){return a.toLowerCase()},balance:function(){var a=[p("[-/]")," ",p("[^a-z0-9 ]"),"",p("\\s\\s+")," "];return function(b){b=t(b.toLowerCase(),a);for(var c="",e="",f="",d=0;d<b.length;d++){var g=b[d];if(g!==e)if(d&&"h"===g){if(f="a"===f||"e"===f||"i"===f||"o"===f||"u"===f||"y"===f,("a"===e||"e"===e||"i"===e||"o"===e||"u"===e||"y"===e)&&f||" "===e)c+=g}else c+=g;f=d===b.length-1?"":b[d+1];e=g}return c}}()}),M=null;return d}(!1),this);
|
||||||
this);
|
|
||||||
|
50
flexsearch.min.js
vendored
50
flexsearch.min.js
vendored
@@ -1,30 +1,30 @@
|
|||||||
/*
|
/*
|
||||||
FlexSearch v0.2.68
|
FlexSearch v0.2.70
|
||||||
Copyright 2018 Thomas Wilkerling
|
Copyright 2018 Thomas Wilkerling
|
||||||
Released under the Apache 2.0 Licence
|
Released under the Apache 2.0 Licence
|
||||||
https://github.com/nextapps-de/flexsearch
|
https://github.com/nextapps-de/flexsearch
|
||||||
*/
|
*/
|
||||||
'use strict';(function(u,D,f){var w;(w=f.define)&&w.amd?w([],function(){return D}):(w=f.modules)?w[u.toLowerCase()]=D:"undefined"!==typeof module?module.exports=D:f[u]=D})("FlexSearch",function P(u){function f(a){"string"!==typeof a||x[a]||(a=I[a]);a||(a=y);this.id=a.id||Q++;this.init(a);w(this,"index",function(){return this.a});w(this,"length",function(){return Object.keys(this.a).length})}function w(a,b,e){Object.defineProperty(a,b,{get:e})}function d(a){return new RegExp(a,"g")}function A(a,b,
|
'use strict';(function(v,D,f){var w;(w=f.define)&&w.amd?w([],function(){return D}):(w=f.modules)?w[v.toLowerCase()]=D:"undefined"!==typeof module?module.exports=D:f[v]=D})("FlexSearch",function P(v){function f(a){"string"!==typeof a||y[a]||(a=I[a]);a||(a=z);this.id=a.id||Q++;this.init(a);w(this,"index",function(){return this.a});w(this,"length",function(){return Object.keys(this.a).length})}function w(a,b,d){Object.defineProperty(a,b,{get:d})}function e(a){return new RegExp(a,"g")}function x(a,b,
|
||||||
e){if("undefined"===typeof e){for(e=0;e<b.length;e+=2)a=a.replace(b[e],b[e+1]);return a}return a.replace(b,e)}function z(a,b,e,c,l,B,g){if("undefined"===typeof b[e]){var h=l?(9-(g||6))*B+(g||6)*l:B;b[e]=h;h>=g&&(a=a[h+.5|0],a=a[e]||(a[e]=[]),a[a.length]=c)}return h||b[e]}function m(a,b){if(a)for(var e=Object.keys(a),c=0,l=e.length;c<l;c++){var B=e[c],g=a[B];if(g)for(var h=0,d=g.length;h<d;h++)if(g[h]===b){1===d?delete a[B]:g.splice(h,1);break}else"object"===typeof g[h]&&m(g[h],b)}}function J(a){var b=
|
d){if("undefined"===typeof d){for(d=0;d<b.length;d+=2)a=a.replace(b[d],b[d+1]);return a}return a.replace(b,d)}function A(a,b,d,c,g,B,h){if(b[d])return b[d];g=g?(9-(h||6))*B+(h||6)*g:B;b[d]=g;g>=h&&(a=a[g+.5|0],a=a[d]||(a[d]=[]),a[a.length]=c);return g}function r(a,b){if(a)for(var d=Object.keys(a),c=0,g=d.length;c<g;c++){var B=d[c],h=a[B];if(h)for(var l=0,e=h.length;l<e;l++)if(h[l]===b){1===e?delete a[B]:h.splice(l,1);break}else"object"===typeof h[l]&&r(h[l],b)}}function J(a){var b=[];if(!a)return b;
|
||||||
[];if(!a)return b;for(var e=0,c=0,l=0,B="",g=a.length,h=0;h<g;h++){var d=a[h];"a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d?e++:c++;" "!==d&&(B+=d);if(" "===d||e>=(8<g?2:1)&&2<=c||2<=e&&c>=(8<g?2:1)||h===g-1)B&&(b[l]&&2<B.length&&l++,b[l]=b[l]?b[l]+B:B," "===d&&l++,B=""),c=e=0}return b}function G(a){for(var b="",e="",c="",l=0;l<a.length;l++){var d=a[l];if(d!==e)if(l&&"h"===d){if(c="a"===c||"e"===c||"i"===c||"o"===c||"u"===c||"y"===c,("a"===e||"e"===e||"i"===e||"o"===e||"u"===e||"y"===e)&&c||
|
for(var d=0,c=0,g=0,B="",h=a.length,l=0;l<h;l++){var e=a[l];"a"===e||"e"===e||"i"===e||"o"===e||"u"===e||"y"===e?d++:c++;" "!==e&&(B+=e);if(" "===e||d>=(8<h?2:1)&&2<=c||2<=d&&c>=(8<h?2:1)||l===h-1)B&&(b[g]&&2<B.length&&g++,b[g]=b[g]?b[g]+B:B," "===e&&g++,B=""),c=d=0}return b}function G(a){for(var b="",d="",c="",g=0;g<a.length;g++){var e=a[g];if(e!==d)if(g&&"h"===e){if(c="a"===c||"e"===c||"i"===c||"o"===c||"u"===c||"y"===c,("a"===d||"e"===d||"i"===d||"o"===d||"u"===d||"y"===d)&&c||" "===d)b+=e}else b+=
|
||||||
" "===e)b+=d}else b+=d;c=l===a.length-1?"":a[l+1];e=d}return b}function R(a,b){var e=r();if(a)for(var c=0;c<a.length;c++){var l=b?b.call(C,a[c]):a[c];e[l]=String.fromCharCode(65E3-a.length+c)}return e}function S(a,b){var e=[];if(a)for(var c in a)if(a.hasOwnProperty(c)){var l=b?b.call(C,c):c;e.push(d("(?=.{"+(l.length+3)+",})"+l+"$"),b?b.call(C,a[c]):a[c])}return e}function T(a,b){a=a.length-b.length;return 0>a?1:0<a?-1:0}function U(a,b){a=a.length-b.length;return 0>a?-1:0<a?1:0}function V(a,b,e){var c=
|
e;c=g===a.length-1?"":a[g+1];d=e}return b}function R(a,b){var d=t();if(a)for(var c=0;c<a.length;c++){var g=b?b.call(C,a[c]):a[c];d[g]=String.fromCharCode(65E3-a.length+c)}return d}function S(a,b){var d=[];if(a)for(var c in a)if(a.hasOwnProperty(c)){var g=b?b.call(C,c):c;d.push(e("(?=.{"+(g.length+3)+",})"+g+"$"),b?b.call(C,a[c]):a[c])}return d}function T(a,b){a=a.length-b.length;return 0>a?1:0<a?-1:0}function U(a,b){a=a.length-b.length;return 0>a?-1:0<a?1:0}function V(a,b,d){var c=[],g=[],e=a.length;
|
||||||
[],l=[],d=a.length;if(1<d){a.sort(U);for(var g=r(),h=a[0],f=h.length,n=0;n<f;)g[h[n++]]=1;for(var q,v=0,p=1;p<d;){var k=!1,m=p===d-1;l=[];h=a[p];f=h.length;for(n=-1;n<f;){var t=g[q=h[++n]];if(t===p){if(m&&(c[v++]=q,b&&v===b))return c;k=!0;g[q]=p+1}else e&&(t=l[t]||(l[t]=[]),t[t.length]=q)}if(!k&&!e)break;p++}if(e&&(b||(b=1E3),v=c.length,f=l.length,v<b&&f))for(p=f-1;0<=p;p--)if(q=l[p])for(n=0;n<q.length;n++)if(c[v++]=q[n],b&&v===b)return c}else d&&(c=a[0],b&&c.length>b&&(c=c.slice(0,b)));return c}
|
if(1<e){a.sort(U);for(var h=t(),l=a[0],f=l.length,m=0;m<f;)h[l[m++]]=1;for(var n,u=0,p=1;p<e;){var k=!1,r=p===e-1;g=[];l=a[p];f=l.length;for(m=-1;m<f;)if(n=l[++m],h[n]){var q=h[n];if(q===p){if(r){if(c[u++]=n,b&&u===b)return c}else h[n]=p+1;k=!0}else d&&(q=g[q]?g[q]:g[q]=[],q[q.length]=n)}if(!k&&!d)break;p++}if(d&&(u=c.length,(f=g.length)&&(!b||u<b)))for(p=f-1;0<=p;p--)if(n=g[p])for(m=0;m<n.length;m++)if(c[u++]=n[m],b&&u===b)return c}else e&&(c=a[0],b&&c.length>b&&(c=c.slice(0,b)));return c}function H(a){a.C||
|
||||||
function H(a){a.C||(a.C=K(function(){a.C=null;var b=a.async;b&&(a.async=!1);if(a.c.length){for(var e=L(),c;(c=a.c.shift())||0===c;){var d=a.f[c];switch(d[0]){case E.add:a.add(d[1],d[2]);break;case E.remove:a.remove(d[1])}delete a.f[c];if(100<L()-e)break}a.c.length&&H(a)}b&&(a.async=b)},1,"search-async-"+a.id))}function L(){return"undefined"!==typeof performance?performance.now():(new Date).getTime()}function r(a){if(a){for(var b=Array(a),e=0;e<a;e++)b[e]=r();return b}return Object.create(null)}function W(a,
|
(a.C=K(function(){a.C=null;var b=a.async;b&&(a.async=!1);if(a.c.length){for(var d=L(),c;(c=a.c.shift())||0===c;){var g=a.f[c];switch(g[0]){case E.add:a.add(g[1],g[2]);break;case E.remove:a.remove(g[1])}delete a.f[c];if(100<L()-d)break}a.c.length&&H(a)}b&&(a.async=b)},1,"search-async-"+a.id))}function L(){return"undefined"!==typeof performance?performance.now():(new Date).getTime()}function t(a){if(a){for(var b=Array(a),d=0;d<a;d++)b[d]=Object.create(null);return b}return Object.create(null)}function W(a,
|
||||||
b,e,c){a=u("flexsearch","id"+a,function(){var a,b;self.onmessage=function(c){if(c=c.data)if(c.search){var e=b.search(c.content,c.threshold?{limit:c.limit,threshold:c.threshold}:c.limit);self.postMessage({id:a,content:c.content,limit:c.limit,result:e})}else c.add?b.add(c.id,c.content):c.update?b.update(c.id,c.content):c.remove?b.remove(c.id):c.reset?b.reset():c.info?(c=b.info(),c.worker=a,b.debug&&console.log(c)):c.register&&(a=c.id,c.options.cache=!1,c.options.async=!0,c.options.worker=!1,b=(new Function(c.register.substring(c.register.indexOf("{")+
|
b,d,c){a=v("flexsearch","id"+a,function(){var a,b;self.onmessage=function(c){if(c=c.data)if(c.search){var d=b.search(c.content,c.threshold?{limit:c.limit,threshold:c.threshold}:c.limit);self.postMessage({id:a,content:c.content,limit:c.limit,result:d})}else c.add?b.add(c.id,c.content):c.update?b.update(c.id,c.content):c.remove?b.remove(c.id):c.reset?b.reset():c.info?(c=b.info(),c.worker=a,b.debug&&console.log(c)):c.register&&(a=c.id,c.options.cache=!1,c.options.async=!0,c.options.worker=!1,b=(new Function(c.register.substring(c.register.indexOf("{")+
|
||||||
1,c.register.lastIndexOf("}"))))(),b=new b(c.options))}},function(a){(a=a.data)&&a.result?c(a.id,a.content,a.result,a.limit):e.debug&&console.log(a)},b);var d=P.toString();e.id=b;a.postMessage(b,{register:d,options:e,id:b});return a}var y={encode:"icase",mode:"forward",u:!1,cache:!1,async:!1,b:!1,threshold:0,depth:0},I={memory:{encode:"extra",mode:"strict",threshold:7},speed:{encode:"icase",mode:"strict",threshold:7,depth:2},match:{encode:"extra",mode:"full"},score:{encode:"extra",mode:"strict",threshold:5,
|
1,c.register.lastIndexOf("}"))))(),b=new b(c.options))}},function(a){(a=a.data)&&a.result?c(a.id,a.content,a.result,a.limit):d.debug&&console.log(a)},b);var g=P.toString();d.id=b;a.postMessage(b,{register:g,options:d,id:b});return a}var z={encode:"icase",mode:"forward",u:!1,cache:!1,async:!1,b:!1,threshold:0,depth:0},I={memory:{encode:"extra",mode:"strict",threshold:7},speed:{encode:"icase",mode:"strict",threshold:7,depth:2},match:{encode:"extra",mode:"full"},score:{encode:"extra",mode:"strict",threshold:5,
|
||||||
depth:4},balance:{encode:"balance",mode:"ngram",threshold:6,depth:3},fastest:{encode:"icase",mode:"strict",threshold:9,depth:1}},F=[],Q=0,E={add:0,update:1,remove:2},M=d("[ -/]"),N=r(),O=r(),x=function(){for(var a=Object.getOwnPropertyNames({}.__proto__),b=r(),e=0;e<a.length;e++)b[a[e]]=1;return b}();f.new=function(a){return new this(a)};f.create=function(a){return f.new(a)};f.registerMatcher=function(a){for(var b in a)a.hasOwnProperty(b)&&F.push(d(b),a[b]);return this};f.registerEncoder=function(a,
|
depth:4},balance:{encode:"balance",mode:"ngram",threshold:6,depth:3},fastest:{encode:"icase",mode:"strict",threshold:9,depth:1}},F=[],Q=0,E={add:0,update:1,remove:2},M=e("[ -/]"),N=t(),O=t(),y=function(){for(var a=Object.getOwnPropertyNames({}.__proto__),b=t(),d=0;d<a.length;d++)b[a[d]]=1;return b}();f.new=function(a){return new this(a)};f.create=function(a){return f.new(a)};f.registerMatcher=function(a){for(var b in a)a.hasOwnProperty(b)&&F.push(e(b),a[b]);return this};f.registerEncoder=function(a,
|
||||||
b){x[a]||(C[a]=b);return this};f.registerLanguage=function(a,b){x[a]||(N[a]=b.filter,O[a]=b.stemmer);return this};f.encode=function(a,b){return x[a]?b:C[a].call(C,b)};f.prototype.init=function(a){this.B=[];a||(a=y);var b=a.profile,e=b&&!x[b]?I[b]:r();if(b=a.worker)if("undefined"===typeof Worker)a.worker=!1,this.h=null;else{var c=this;b=parseInt(b,10)||4;c.m=-1;c.o=0;c.g=[];c.A=null;c.h=Array(b);for(var d=0;d<b;d++)c.h[d]=W(c.id,d,a,function(a,b,e,d){if(c.o!==c.b)return c.g=c.g.concat(e),c.o++,d&&
|
b){y[a]||(C[a]=b);return this};f.registerLanguage=function(a,b){y[a]||(N[a]=b.filter,O[a]=b.stemmer);return this};f.encode=function(a,b){return y[a]?b:C[a].call(C,b)};f.prototype.init=function(a){this.B=[];a||(a=z);var b=a.profile,d=b&&!y[b]?I[b]:t();if(b=a.worker)if(Worker){var c=this;b=parseInt(b,10)||4;c.m=-1;c.o=0;c.g=[];c.A=null;c.h=Array(b);for(var g=0;g<b;g++)c.h[g]=W(c.id,g,a,function(a,b,d,g){if(c.o!==c.b)return c.g=c.g.concat(d),c.o++,g&&c.g.length>=g&&(c.o=c.b),c.A&&c.o===c.b&&(c.cache&&
|
||||||
c.g.length>=d&&(c.o=c.b),c.A&&c.o===c.b&&(c.cache&&c.i.set(b,c.g),c.A(c.g),c.g=[]),c})}this.mode=a.mode||e.mode||this.mode||y.mode;this.async=a.async||this.async||y.async;this.b=a.worker||this.b||y.b;this.threshold=a.threshold||e.threshold||this.threshold||y.threshold;this.depth=a.depth||e.depth||this.depth||y.depth;this.u=a.suggest||this.u||y.u;this.s=(b=a.encode||e.encode)&&!x[b]&&C[b]||("function"===typeof b?b:this.s||!1);this.debug=a.debug||this.debug;(b=a.matcher)&&this.addMatcher(b);(b=a.filter)&&
|
c.i.set(b,c.g),c.A(c.g),c.g=[]),c})}else a.worker=!1,this.h=null;this.mode=a.mode||d.mode||this.mode||z.mode;this.async=a.async||this.async||z.async;this.b=a.worker||this.b||z.b;this.threshold=a.threshold||d.threshold||this.threshold||z.threshold;this.depth=a.depth||d.depth||this.depth||z.depth;this.u=a.suggest||this.u||z.u;this.s=(b=a.encode||d.encode)&&!y[b]&&C[b]||("function"===typeof b?b:this.s||!1);this.debug=a.debug||this.debug;(b=a.matcher)&&this.addMatcher(b);if(b=a.filter)this.filter=R(N[b]||
|
||||||
!x[b]&&(this.filter=R(N[b]||b,this.s));(b=a.stemmer)&&!x[b]&&(this.stemmer=S(O[b]||b,this.s));this.j=r(10);this.l=r();this.a=r();this.f=r();this.c=[];this.C=null;this.v=!0;this.i=(this.cache=b=a.cache||this.cache||y.cache)?new X(b):!1;return this};f.prototype.encode=function(a){a&&F.length&&(a=A(a,F));a&&this.B.length&&(a=A(a,this.B));a&&this.s&&(a=this.s.call(C,a));a&&this.stemmer&&(a=A(a,this.stemmer));return a};f.prototype.addMatcher=function(a){var b=this.B,e;for(e in a)a.hasOwnProperty(e)&&b.push(d(e),
|
b,this.s);if(b=a.stemmer)this.stemmer=S(O[b]||b,this.s);this.j=t(10);this.l=t();this.a=t();this.f=t();this.c=[];this.C=null;this.v=!0;this.i=(this.cache=b=a.cache||this.cache||z.cache)?new X(b):!1;return this};f.prototype.encode=function(a){a&&F.length&&(a=x(a,F));a&&this.B.length&&(a=x(a,this.B));a&&this.s&&(a=this.s.call(C,a));a&&this.stemmer&&(a=x(a,this.stemmer));return a};f.prototype.addMatcher=function(a){var b=this.B,d;for(d in a)a.hasOwnProperty(d)&&b.push(e(d),a[d]);return this};f.prototype.add=
|
||||||
a[e]);return this};f.prototype.add=function(a,b,e){if("string"===typeof b&&b&&(a&&!x[a]||0===a))if(this.a[a]&&!e)this.update(a,b);else{if(this.b)return++this.m>=this.h.length&&(this.m=0),this.h[this.m].postMessage(this.m,{add:!0,id:a,content:b}),this.a[a]=""+this.m,this;if(this.async)return this.f[a]||(this.c[this.c.length]=a),this.f[a]=[E.add,a,b],H(this),this;b=this.encode(b);if(!b.length)return this;e=this.mode;b="function"===typeof e?e(b):"ngram"===e?J(b):b.split(M);var c=r();c._ctx=r();for(var d=
|
function(a,b,d){if("string"===typeof b&&b&&(a&&!y[a]||0===a))if(this.a[a]&&!d)this.update(a,b);else{if(this.b)return++this.m>=this.h.length&&(this.m=0),this.h[this.m].postMessage(this.m,{add:!0,id:a,content:b}),this.a[a]=""+this.m,this;if(this.async)return this.f[a]||(this.c[this.c.length]=a),this.f[a]=[E.add,a,b],H(this),this;b=this.encode(b);if(!b.length)return this;d=this.mode;b="function"===typeof d?d(b):"ngram"===d?J(b):b.split(M);var c=t();c._ctx=t();for(var g=this.threshold,e=this.depth,h=
|
||||||
this.threshold,f=this.depth,g=this.j,h=b.length,m=0;m<h;m++){var n=b[m];if(n){var q=n.length,v=(h-m)/h;switch(e){case "reverse":case "both":for(var p="",k=q-1;1<=k;k--)p=n[k]+p,z(g,c,p,a,(q-k)/q,v,d);case "forward":p="";for(k=0;k<q;k++)p+=n[k],z(g,c,p,a,1,v,d);break;case "full":for(k=0;k<q;k++)for(var u=(q-k)/q,t=q;t>k;t--)p=n.substring(k,t),z(g,c,p,a,u,v,d);break;default:if(k=z(g,c,n,a,1,v,d),f&&1<h&&k>=d)for(q=c._ctx[n]||(c._ctx[n]=r()),n=this.l[n]||(this.l[n]=r(10)),k=m-f,t=m+f+1,0>k&&(k=0),t>
|
this.j,l=b.length,f=0;f<l;f++){var m=b[f];if(m){var n=m.length,u=(l-f)/l;switch(d){case "reverse":case "both":for(var p="",k=n-1;1<=k;k--)p=m[k]+p,A(h,c,p,a,(n-k)/n,u,g);case "forward":p="";for(k=0;k<n;k++)p+=m[k],A(h,c,p,a,1,u,g);break;case "full":for(k=0;k<n;k++)for(var r=(n-k)/n,q=n;q>k;q--)p=m.substring(k,q),A(h,c,p,a,r,u,g);break;default:if(k=A(h,c,m,a,1,u,g),e&&1<l&&k>=g)for(n=c._ctx[m]||(c._ctx[m]=t()),m=this.l[m]||(this.l[m]=t(10)),k=f-e,q=f+e+1,0>k&&(k=0),q>l&&(q=l);k<q;k++)k!==f&&A(m,n,
|
||||||
h&&(t=h);k<t;k++)k!==m&&z(n,q,b[k],a,0,10-(k<m?m-k:k-m),d)}}}this.a[a]="1";this.v=!1}return this};f.prototype.update=function(a,b){this.a[a]&&b&&"string"===typeof b&&(this.remove(a),this.add(a,b,!0));return this};f.prototype.remove=function(a){if(this.a[a]&&!x[a]){if(this.b){var b=parseInt(this.a[a],10);this.h[b].postMessage(b,{remove:!0,id:a});delete this.a[a];return this}if(this.async)return this.f[a]||(this.c[this.c.length]=a),this.f[a]=[E.remove,a],H(this),this;for(b=0;10>b;b++)m(this.j[b],a);
|
b[k],a,0,10-(k<f?f-k:k-f),g)}}}this.a[a]="1";this.v=!1}return this};f.prototype.update=function(a,b){this.a[a]&&b&&"string"===typeof b&&(this.remove(a),this.add(a,b,!0));return this};f.prototype.remove=function(a){if(this.a[a]&&!y[a]){if(this.b){var b=parseInt(this.a[a],10);this.h[b].postMessage(b,{remove:!0,id:a});delete this.a[a];return this}if(this.async)return this.f[a]||(this.c[this.c.length]=a),this.f[a]=[E.remove,a],H(this),this;for(b=0;10>b;b++)r(this.j[b],a);this.depth&&r(this.l,a);delete this.a[a];
|
||||||
this.depth&&m(this.l,a);delete this.a[a];this.v=!1}return this};f.prototype.search=function(a,b,e){var c=[];if(a&&"object"===typeof a){e=a.callback||b;b=a.limit;var d=a.threshold;a=a.query}d=(d||this.threshold||0)|0;"function"===typeof b?(e=b,b=1E3):b||(b=1E3);if(this.b){this.A=e;this.o=0;this.g=[];for(c=0;c<this.b;c++)this.h[c].postMessage(c,{search:!0,limit:b,threshold:d,content:a});return null}if(e){var f=this;K(function(){e(f.search(a,b));f=null},1,"search-"+this.id);return null}if(!a||"string"!==
|
this.v=!1}return this};f.prototype.search=function(a,b,d){var c=[];if("object"===typeof a){d=a.callback||b;b=a.limit;var g=a.threshold;a=a.query}g||(g=this.threshold||0);"function"===typeof b?(d=b,b=1E3):b||0===b||(b=1E3);if(this.b){this.A=d;this.o=0;this.g=[];for(c=0;c<this.b;c++)this.h[c].postMessage(c,{search:!0,limit:b,threshold:g,content:a});return null}if(d){var e=this;K(function(){d(e.search(a,b));e=null},1,"search-"+this.id);return null}if(!a||"string"!==typeof a)return c;var h=a;if(this.cache)if(this.v){var f=
|
||||||
typeof a)return c;var g=a;if(this.cache)if(this.v){var h=this.i.get(a);if(h)return h}else this.i.reset(),this.v=!0;g=this.encode(g);if(!g.length)return c;h=this.mode;g="function"===typeof h?h(g):"ngram"===h?J(g):g.split(M);h=g.length;var m=!0,n=[],q=r();if(1<h)if(this.depth){var v=!0,p=g[0];q[p]="1"}else g.sort(T);var k;if(!v||(k=this.l)[p])for(var u=v?1:0;u<h;u++){var t=g[u];if(t&&!q[t]){for(var w,x=!1,y=[],A=0,z=9;z>=d;z--)if(w=(v?k[p]:this.j)[z][t])y[A++]=w,x=!0;if(x)n[n.length]=1<A?n.concat.apply([],
|
this.i.get(a);if(f)return f}else this.i.reset(),this.v=!0;h=this.encode(h);if(!h.length)return c;f=this.mode;h="function"===typeof f?f(h):"ngram"===f?J(h):h.split(M);f=h.length;var r=!0,m=[],n=t();if(1<f)if(this.depth){var u=!0,p=h[0];n[p]="1"}else h.sort(T);var k;if(!u||(k=this.l)[p])for(var v=u?1:0;v<f;v++){var q=h[v];if(q&&!n[q]){for(var w,z=!1,x=[],A=0,y=9;y>=g;y--)w=(u?k[p]:this.j)[y],w[q]&&(x[A++]=w[q],z=!0);if(z)m[m.length]=1<A?m.concat.apply([],x):x[0];else if(!this.u){r=!1;break}n[q]="1"}p=
|
||||||
y):y[0];else if(!this.u){m=!1;break}q[t]="1"}p=t}else m=!1;m&&(c=V(n,b,this.u));this.cache&&this.i.set(a,c);return c};f.prototype.info=function(){if(this.b)for(var a=0;a<this.b;a++)this.h[a].postMessage(a,{info:!0,id:this.id});else{for(var b,e,c=0,d=0,f=0,g=0;10>g;g++)for(b=Object.keys(this.j[g]),a=0;a<b.length;a++)e=this.j[g][b[a]].length,c+=1*e+2*b[a].length+4,d+=e,f+=2*b[a].length;b=Object.keys(this.a);e=b.length;for(a=0;a<e;a++)c+=2*b[a].length+2;return{id:this.id,memory:c,items:e,sequences:d,
|
q}else r=!1;r&&(c=V(m,b,this.u));this.cache&&this.i.set(a,c);return c};f.prototype.info=function(){if(this.b)for(var a=0;a<this.b;a++)this.h[a].postMessage(a,{info:!0,id:this.id});else{for(var b,d,c=0,e=0,f=0,h=0;10>h;h++)for(b=Object.keys(this.j[h]),a=0;a<b.length;a++)d=this.j[h][b[a]].length,c+=1*d+2*b[a].length+4,e+=d,f+=2*b[a].length;b=Object.keys(this.a);d=b.length;for(a=0;a<d;a++)c+=2*b[a].length+2;return{id:this.id,memory:c,items:d,sequences:e,chars:f,cache:this.c.length,matcher:F.length,worker:this.b}}};
|
||||||
chars:f,cache:this.c.length,matcher:F.length,worker:this.b}}};f.prototype.reset=function(){this.destroy();return this.init()};f.prototype.destroy=function(){this.cache&&(this.i.reset(),this.i=null);this.filter=this.stemmer=this.j=this.l=this.a=this.f=this.c=null;return this};var C=Object.create({icase:function(a){return a.toLowerCase()},simple:function(){var a=[d("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),"a",d("[\u00e8\u00e9\u00ea\u00eb]"),"e",d("[\u00ec\u00ed\u00ee\u00ef]"),"i",d("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),
|
f.prototype.reset=function(){this.destroy();return this.init()};f.prototype.destroy=function(){this.cache&&(this.i.reset(),this.i=null);this.filter=this.stemmer=this.j=this.l=this.a=this.f=this.c=null;return this};var C=Object.create({icase:function(a){return a.toLowerCase()},simple:function(){var a=[e("[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5]"),"a",e("[\u00e8\u00e9\u00ea\u00eb]"),"e",e("[\u00ec\u00ed\u00ee\u00ef]"),"i",e("[\u00f2\u00f3\u00f4\u00f5\u00f6\u0151]"),"o",e("[\u00f9\u00fa\u00fb\u00fc\u0171]"),
|
||||||
"o",d("[\u00f9\u00fa\u00fb\u00fc\u0171]"),"u",d("[\u00fd\u0177\u00ff]"),"y",d("\u00f1"),"n",d("\u00e7"),"c",d("\u00df"),"s",d(" & ")," and ",d("[-/]")," ",d("[^a-z0-9 ]"),"",d("\\s\\s+")," "];return function(b){b=A(b.toLowerCase(),a);return" "!==b?b:""}}(),advanced:function(){var a=[d("ae"),"a",d("ai"),"ei",d("ay"),"ei",d("ey"),"ei",d("oe"),"o",d("ue"),"u",d("ie"),"i",d("sz"),"s",d("zs"),"s",d("sh"),"s",d("ck"),"k",d("cc"),"k",d("dt"),"t",d("ph"),"f",d("pf"),"f",d("ou"),"o",d("uo"),"u"];return function(b,
|
"u",e("[\u00fd\u0177\u00ff]"),"y",e("\u00f1"),"n",e("\u00e7"),"c",e("\u00df"),"s",e(" & ")," and ",e("[-/]")," ",e("[^a-z0-9 ]"),"",e("\\s\\s+")," "];return function(b){b=x(b.toLowerCase(),a);return" "!==b?b:""}}(),advanced:function(){var a=[e("ae"),"a",e("ai"),"ei",e("ay"),"ei",e("ey"),"ei",e("oe"),"o",e("ue"),"u",e("ie"),"i",e("sz"),"s",e("zs"),"s",e("sh"),"s",e("ck"),"k",e("cc"),"k",e("dt"),"t",e("ph"),"f",e("pf"),"f",e("ou"),"o",e("uo"),"u"];return function(b,d){if(!b)return b;b=this.simple(b);
|
||||||
e){if(!b)return b;b=this.simple(b);2<b.length&&(b=A(b,a));e||1<b.length&&(b=G(b));return b}}(),extra:function(){var a=[d("p"),"b",d("z"),"s",d("[cgq]"),"k",d("n"),"m",d("d"),"t",d("[vw]"),"f",d("[aeiouy]"),""];return function(b){if(!b)return b;b=this.advanced(b,!0);if(1<b.length){b=b.split(" ");for(var e=0;e<b.length;e++){var c=b[e];1<c.length&&(b[e]=c[0]+A(c.substring(1),a))}b=b.join(" ");b=G(b)}return b}}(),balance:function(){var a=[d("[-/]")," ",d("[^a-z0-9 ]"),"",d("\\s\\s+")," "];return function(b){return G(A(b.toLowerCase(),
|
2<b.length&&(b=x(b,a));d||1<b.length&&(b=G(b));return b}}(),extra:function(){var a=[e("p"),"b",e("z"),"s",e("[cgq]"),"k",e("n"),"m",e("d"),"t",e("[vw]"),"f",e("[aeiouy]"),""];return function(b){if(!b)return b;b=this.advanced(b,!0);if(1<b.length){b=b.split(" ");for(var d=0;d<b.length;d++){var c=b[d];1<c.length&&(b[d]=c[0]+x(c.substring(1),a))}b=b.join(" ");b=G(b)}return b}}(),balance:function(){var a=[e("[-/]")," ",e("[^a-z0-9 ]"),"",e("\\s\\s+")," "];return function(b){return G(x(b.toLowerCase(),
|
||||||
a))}}()}),K=function(){var a=r();return function(b,e,c){var d=a[c];d&&clearTimeout(d);return a[c]=setTimeout(b,e)}}(),X=function(){function a(a){this.reset();this.w=!0!==a&&a}a.prototype.reset=function(){this.cache=r();this.count=r();this.index=r();this.a=[]};a.prototype.set=function(a,e){if(this.w&&"undefined"===typeof this.cache[a]){var b=this.a.length;if(b===this.w){b--;var d=this.a[b];delete this.cache[d];delete this.count[d];delete this.index[d]}this.index[a]=b;this.a[b]=a;this.count[a]=-1;this.cache[a]=
|
a))}}()}),K=function(){var a=t();return function(b,d,c){var e=a[c];e&&clearTimeout(e);return a[c]=setTimeout(b,d)}}(),X=function(){function a(a){this.reset();this.w=!0!==a&&a}a.prototype.reset=function(){this.cache=t();this.count=t();this.index=t();this.a=[]};a.prototype.set=function(a,d){if(this.w&&"undefined"===typeof this.cache[a]){var b=this.a.length;if(b===this.w){b--;var e=this.a[b];delete this.cache[e];delete this.count[e];delete this.index[e]}this.index[a]=b;this.a[b]=a;this.count[a]=-1;this.cache[a]=
|
||||||
e;this.get(a)}else this.cache[a]=e};a.prototype.get=function(a){var b=this.cache[a];if(this.w&&b){var c=++this.count[a],d=this.index,f=d[a];if(0<f){for(var g=this.a,h=f;this.count[g[--f]]<=c&&-1!==f;);f++;if(f!==h){for(c=h;c>f;c--)h=g[c-1],g[c]=h,d[h]=c;g[f]=a;d[a]=f}}}return b};return a}();return f}(function(){var u=Object.create(null),D=!("undefined"===typeof Blob||"undefined"===typeof URL||!URL.createObjectURL);return function(f,w,d,A,z){var m=f;f=D?URL.createObjectURL(new Blob(["var SUPPORT_WORKER = true;var SUPPORT_BUILTINS = true;var SUPPORT_DEBUG = true;var SUPPORT_CACHE = true;var SUPPORT_ASYNC = true;("+
|
d;this.get(a)}else this.cache[a]=d};a.prototype.get=function(a){var b=this.cache[a];if(this.w&&b){var c=++this.count[a],e=this.index,f=e[a];if(0<f){for(var h=this.a,l=f;this.count[h[--f]]<=c&&-1!==f;);f++;if(f!==l){for(c=l;c>f;c--)l=h[c-1],h[c]=l,e[l]=c;h[f]=a;e[a]=f}}}return b};return a}();return f}(function(){var v=Object.create(null),D=!("undefined"===typeof Blob||"undefined"===typeof URL||!URL.createObjectURL);return function(f,w,e,x,A){var r=f;f=D?URL.createObjectURL(new Blob(["var SUPPORT_WORKER = true;var SUPPORT_BUILTINS = true;var SUPPORT_DEBUG = true;var SUPPORT_CACHE = true;var SUPPORT_ASYNC = true;("+
|
||||||
d.toString()+")()"],{type:"text/javascript"})):"../"+m+".js";m+="-"+w;u[m]||(u[m]=[]);u[m][z]=new Worker(f);u[m][z].onmessage=A;console.log("Register Worker: "+m+"@"+z);return{postMessage:function(d,f){u[m][d].postMessage(f)}}}}()),this);
|
e.toString()+")()"],{type:"text/javascript"})):"../"+r+".js";r+="-"+w;v[r]||(v[r]=[]);v[r][A]=new Worker(f);v[r][A].onmessage=x;console.log("Register Worker: "+r+"@"+A);return{postMessage:function(e,f){v[r][e].postMessage(f)}}}}()),this);
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "flexsearch",
|
"name": "flexsearch",
|
||||||
"version": "0.2.69",
|
"version": "0.2.70",
|
||||||
"description": "Next-Generation full text search library with zero dependencies.",
|
"description": "Next-Generation full text search library with zero dependencies.",
|
||||||
"homepage": "https://github.com/nextapps-de/flexsearch/",
|
"homepage": "https://github.com/nextapps-de/flexsearch/",
|
||||||
"author": "Thomas Wilkerling",
|
"author": "Thomas Wilkerling",
|
||||||
@@ -52,11 +52,11 @@
|
|||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"codacy-coverage": "^3.0.0",
|
"codacy-coverage": "^3.0.0",
|
||||||
"coveralls": "^3.0.1",
|
"coveralls": "^3.0.1",
|
||||||
"google-closure-compiler": "^20180716.0.0",
|
"google-closure-compiler": "^20190124.0.0-nightly",
|
||||||
"mocha": "^5.1.1",
|
"mocha": "^5.1.1",
|
||||||
"mocha-lcov-reporter": "^1.3.0",
|
"mocha-lcov-reporter": "^1.3.0",
|
||||||
"mocha-phantomjs": "^4.1.0",
|
"mocha-phantomjs": "^4.1.0",
|
||||||
"nyc": "^12.0.1",
|
"nyc": "^13.1.0",
|
||||||
"phantomjs-prebuilt": "^2.1.16",
|
"phantomjs-prebuilt": "^2.1.16",
|
||||||
"updtr": "^2.0.0"
|
"updtr": "^2.0.0"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user