Welcome to mirror list, hosted at ThFree Co, Russian Federation.

search.bundle.js « js « static - github.com/matsuyoshi30/harbor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9db6077639554e771438c05077280c3c7f65bdba (plain)
1
2
/*! For license information please see search.bundle.js.LICENSE.txt */
(()=>{var e={336:(e,t,r)=>{var n,i;!function(){var s,o,a,u,l,c,h,d,f,p,y,m,g,v,x,w,k,E,S,b,I,T,Q,R,O,N,L=function(e){var t=new L.Builder;return t.pipeline.add(L.trimmer,L.stopWordFilter,L.stemmer),t.searchPipeline.add(L.stemmer),e.call(t,t),t.build()};L.version="2.3.8",L.utils={},L.utils.warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),L.utils.asString=function(e){return null==e?"":e.toString()},L.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),n=0;n<r.length;n++){var i=r[n],s=e[i];if(Array.isArray(s))t[i]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[i]=s}}return t},L.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},L.FieldRef.joiner="/",L.FieldRef.fromString=function(e){var t=e.indexOf(L.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var r=e.slice(0,t),n=e.slice(t+1);return new L.FieldRef(n,r,e)},L.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+L.FieldRef.joiner+this.docRef),this._stringValue},L.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},L.Set.complete={intersect:function(e){return e},union:function(e){return e},contains:function(){return!0}},L.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},L.Set.prototype.contains=function(e){return!!this.elements[e]},L.Set.prototype.intersect=function(e){var t,r,n,i=[];if(e===L.Set.complete)return this;if(e===L.Set.empty)return e;this.length<e.length?(t=this,r=e):(t=e,r=this),n=Object.keys(t.elements);for(var s=0;s<n.length;s++){var o=n[s];o in r.elements&&i.push(o)}return new L.Set(i)},L.Set.prototype.union=function(e){return e===L.Set.complete?L.Set.complete:e===L.Set.empty?this:new L.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},L.idf=function(e,t){var r=0;for(var n in e)"_index"!=n&&(r+=Object.keys(e[n]).length);var i=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(i))},L.Token=function(e,t){this.str=e||"",this.metadata=t||{}},L.Token.prototype.toString=function(){return this.str},L.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},L.Token.prototype.clone=function(e){return e=e||function(e){return e},new L.Token(e(this.str,this.metadata),this.metadata)},L.tokenizer=function(e,t){if(null==e||null==e)return[];if(Array.isArray(e))return e.map((function(e){return new L.Token(L.utils.asString(e).toLowerCase(),L.utils.clone(t))}));for(var r=e.toString().toLowerCase(),n=r.length,i=[],s=0,o=0;s<=n;s++){var a=s-o;if(r.charAt(s).match(L.tokenizer.separator)||s==n){if(a>0){var u=L.utils.clone(t)||{};u.position=[o,a],u.index=i.length,i.push(new L.Token(r.slice(o,s),u))}o=s+1}}return i},L.tokenizer.separator=/[\s\-]+/,L.Pipeline=function(){this._stack=[]},L.Pipeline.registeredFunctions=Object.create(null),L.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&L.utils.warn("Overwriting existing registered function: "+t),e.label=t,L.Pipeline.registeredFunctions[e.label]=e},L.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||L.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},L.Pipeline.load=function(e){var t=new L.Pipeline;return e.forEach((function(e){var r=L.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},L.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){L.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},L.Pipeline.prototype.after=function(e,t){L.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},L.Pipeline.prototype.before=function(e,t){L.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},L.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},L.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var n=this._stack[r],i=[],s=0;s<e.length;s++){var o=n(e[s],s,e);if(null!=o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)i.push(o[a]);else i.push(o)}e=i}return e},L.Pipeline.prototype.runString=function(e,t){var r=new L.Token(e,t);return this.run([r]).map((function(e){return e.toString()}))},L.Pipeline.prototype.reset=function(){this._stack=[]},L.Pipeline.prototype.toJSON=function(){return this._stack.map((function(e){return L.Pipeline.warnIfFunctionNotRegistered(e),e.label}))},L.Vector=function(e){this._magnitude=0,this.elements=e||[]},L.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,n=r-t,i=Math.floor(n/2),s=this.elements[2*i];n>1&&(s<e&&(t=i),s>e&&(r=i),s!=e);)n=r-t,i=t+Math.floor(n/2),s=this.elements[2*i];return s==e||s>e?2*i:s<e?2*(i+1):void 0},L.Vector.prototype.insert=function(e,t){this.upsert(e,t,(function(){throw"duplicate index"}))},L.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var n=this.positionForIndex(e);this.elements[n]==e?this.elements[n+1]=r(this.elements[n+1],t):this.elements.splice(n,0,e,t)},L.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;r<t;r+=2){var n=this.elements[r];e+=n*n}return this._magnitude=Math.sqrt(e)},L.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,n=e.elements,i=r.length,s=n.length,o=0,a=0,u=0,l=0;u<i&&l<s;)(o=r[u])<(a=n[l])?u+=2:o>a?l+=2:o==a&&(t+=r[u+1]*n[l+1],u+=2,l+=2);return t},L.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},L.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t<this.elements.length;t+=2,r++)e[r]=this.elements[t];return e},L.Vector.prototype.toJSON=function(){return this.elements},L.stemmer=(o={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},a={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},u="[aeiouy]",l="[^aeiou][^aeiouy]*",c=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),h=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),d=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),f=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy]"),p=/^(.+?)(ss|i)es$/,y=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,v=/.$/,x=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+l+u+"[^aeiouwxy]$"),E=/^(.+?[^aeiou])y$/,S=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,b=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,I=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,T=/^(.+?)(s|t)(ion)$/,Q=/^(.+?)e$/,R=/ll$/,O=new RegExp("^"+l+u+"[^aeiouwxy]$"),N=function(e){var t,r,n,i,s,u,l;if(e.length<3)return e;if("y"==(n=e.substr(0,1))&&(e=n.toUpperCase()+e.substr(1)),s=y,(i=p).test(e)?e=e.replace(i,"$1$2"):s.test(e)&&(e=e.replace(s,"$1$2")),s=g,(i=m).test(e)){var N=i.exec(e);(i=c).test(N[1])&&(i=v,e=e.replace(i,""))}else s.test(e)&&(t=(N=s.exec(e))[1],(s=f).test(t)&&(u=w,l=k,(s=x).test(e=t)?e+="e":u.test(e)?(i=v,e=e.replace(i,"")):l.test(e)&&(e+="e")));return(i=E).test(e)&&(e=(t=(N=i.exec(e))[1])+"i"),(i=S).test(e)&&(t=(N=i.exec(e))[1],r=N[2],(i=c).test(t)&&(e=t+o[r])),(i=b).test(e)&&(t=(N=i.exec(e))[1],r=N[2],(i=c).test(t)&&(e=t+a[r])),s=T,(i=I).test(e)?(t=(N=i.exec(e))[1],(i=h).test(t)&&(e=t)):s.test(e)&&(t=(N=s.exec(e))[1]+N[2],(s=h).test(t)&&(e=t)),(i=Q).test(e)&&(t=(N=i.exec(e))[1],s=d,u=O,((i=h).test(t)||s.test(t)&&!u.test(t))&&(e=t)),s=h,(i=R).test(e)&&s.test(e)&&(i=v,e=e.replace(i,"")),"y"==n&&(e=n.toLowerCase()+e.substr(1)),e},function(e){return e.update(N)}),L.Pipeline.registerFunction(L.stemmer,"stemmer"),L.generateStopWordFilter=function(e){var t=e.reduce((function(e,t){return e[t]=t,e}),{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},L.stopWordFilter=L.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),L.Pipeline.registerFunction(L.stopWordFilter,"stopWordFilter"),L.trimmer=function(e){return e.update((function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")}))},L.Pipeline.registerFunction(L.trimmer,"trimmer"),L.TokenSet=function(){this.final=!1,this.edges={},this.id=L.TokenSet._nextId,L.TokenSet._nextId+=1},L.TokenSet._nextId=1,L.TokenSet.fromArray=function(e){for(var t=new L.TokenSet.Builder,r=0,n=e.length;r<n;r++)t.insert(e[r]);return t.finish(),t.root},L.TokenSet.fromClause=function(e){return"editDistance"in e?L.TokenSet.fromFuzzyString(e.term,e.editDistance):L.TokenSet.fromString(e.term)},L.TokenSet.fromFuzzyString=function(e,t){for(var r=new L.TokenSet,n=[{node:r,editsRemaining:t,str:e}];n.length;){var i=n.pop();if(i.str.length>0){var s,o=i.str.charAt(0);o in i.node.edges?s=i.node.edges[o]:(s=new L.TokenSet,i.node.edges[o]=s),1==i.str.length&&(s.final=!0),n.push({node:s,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var a=i.node.edges["*"];else a=new L.TokenSet,i.node.edges["*"]=a;if(0==i.str.length&&(a.final=!0),n.push({node:a,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&n.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var u=i.node.edges["*"];else u=new L.TokenSet,i.node.edges["*"]=u;1==i.str.length&&(u.final=!0),n.push({node:u,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var l,c=i.str.charAt(0),h=i.str.charAt(1);h in i.node.edges?l=i.node.edges[h]:(l=new L.TokenSet,i.node.edges[h]=l),1==i.str.length&&(l.final=!0),n.push({node:l,editsRemaining:i.editsRemaining-1,str:c+i.str.slice(2)})}}}return r},L.TokenSet.fromString=function(e){for(var t=new L.TokenSet,r=t,n=0,i=e.length;n<i;n++){var s=e[n],o=n==i-1;if("*"==s)t.edges[s]=t,t.final=o;else{var a=new L.TokenSet;a.final=o,t.edges[s]=a,t=a}}return r},L.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),n=Object.keys(r.node.edges),i=n.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var s=0;s<i;s++){var o=n[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},L.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,n=0;n<r;n++){var i=t[n];e=e+i+this.edges[i].id}return e},L.TokenSet.prototype.intersect=function(e){for(var t=new L.TokenSet,r=void 0,n=[{qNode:e,output:t,node:this}];n.length;){r=n.pop();for(var i=Object.keys(r.qNode.edges),s=i.length,o=Object.keys(r.node.edges),a=o.length,u=0;u<s;u++)for(var l=i[u],c=0;c<a;c++){var h=o[c];if(h==l||"*"==l){var d=r.node.edges[h],f=r.qNode.edges[l],p=d.final&&f.final,y=void 0;h in r.output.edges?(y=r.output.edges[h]).final=y.final||p:((y=new L.TokenSet).final=p,r.output.edges[h]=y),n.push({qNode:f,output:y,node:d})}}}return t},L.TokenSet.Builder=function(){this.previousWord="",this.root=new L.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},L.TokenSet.Builder.prototype.insert=function(e){var t,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var n=0;n<e.length&&n<this.previousWord.length&&e[n]==this.previousWord[n];n++)r++;for(this.minimize(r),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child,n=r;n<e.length;n++){var i=new L.TokenSet,s=e[n];t.edges[s]=i,this.uncheckedNodes.push({parent:t,char:s,child:i}),t=i}t.final=!0,this.previousWord=e},L.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},L.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var r=this.uncheckedNodes[t],n=r.child.toString();n in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[n]:(r.child._str=n,this.minimizedNodes[n]=r.child),this.uncheckedNodes.pop()}},L.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},L.Index.prototype.search=function(e){return this.query((function(t){new L.QueryParser(e,t).parse()}))},L.Index.prototype.query=function(e){for(var t=new L.Query(this.fields),r=Object.create(null),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a<this.fields.length;a++)n[this.fields[a]]=new L.Vector;for(e.call(t,t),a=0;a<t.clauses.length;a++){var u,l=t.clauses[a],c=L.Set.complete;u=l.usePipeline?this.pipeline.runString(l.term,{fields:l.fields}):[l.term];for(var h=0;h<u.length;h++){var d=u[h];l.term=d;var f=L.TokenSet.fromClause(l),p=this.tokenSet.intersect(f).toArray();if(0===p.length&&l.presence===L.Query.presence.REQUIRED){for(var y=0;y<l.fields.length;y++)s[P=l.fields[y]]=L.Set.empty;break}for(var m=0;m<p.length;m++){var g=p[m],v=this.invertedIndex[g],x=v._index;for(y=0;y<l.fields.length;y++){var w=v[P=l.fields[y]],k=Object.keys(w),E=g+"/"+P,S=new L.Set(k);if(l.presence==L.Query.presence.REQUIRED&&(c=c.union(S),void 0===s[P]&&(s[P]=L.Set.complete)),l.presence!=L.Query.presence.PROHIBITED){if(n[P].upsert(x,l.boost,(function(e,t){return e+t})),!i[E]){for(var b=0;b<k.length;b++){var I,T=k[b],Q=new L.FieldRef(T,P),R=w[T];void 0===(I=r[Q])?r[Q]=new L.MatchData(g,P,R):I.add(g,P,R)}i[E]=!0}}else void 0===o[P]&&(o[P]=L.Set.empty),o[P]=o[P].union(S)}}}if(l.presence===L.Query.presence.REQUIRED)for(y=0;y<l.fields.length;y++)s[P=l.fields[y]]=s[P].intersect(c)}var O=L.Set.complete,N=L.Set.empty;for(a=0;a<this.fields.length;a++){var P;s[P=this.fields[a]]&&(O=O.intersect(s[P])),o[P]&&(N=N.union(o[P]))}var C=Object.keys(r),F=[],j=Object.create(null);if(t.isNegated())for(C=Object.keys(this.fieldVectors),a=0;a<C.length;a++){Q=C[a];var _=L.FieldRef.fromString(Q);r[Q]=new L.MatchData}for(a=0;a<C.length;a++){var A=(_=L.FieldRef.fromString(C[a])).docRef;if(O.contains(A)&&!N.contains(A)){var D,M=this.fieldVectors[_],B=n[_.fieldName].similarity(M);if(void 0!==(D=j[A]))D.score+=B,D.matchData.combine(r[_]);else{var z={ref:A,score:B,matchData:r[_]};j[A]=z,F.push(z)}}}return F.sort((function(e,t){return t.score-e.score}))},L.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map((function(e){return[e,this.invertedIndex[e]]}),this),t=Object.keys(this.fieldVectors).map((function(e){return[e,this.fieldVectors[e].toJSON()]}),this);return{version:L.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},L.Index.load=function(e){var t={},r={},n=e.fieldVectors,i=Object.create(null),s=e.invertedIndex,o=new L.TokenSet.Builder,a=L.Pipeline.load(e.pipeline);e.version!=L.version&&L.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+L.version+"' does not match serialized index '"+e.version+"'");for(var u=0;u<n.length;u++){var l=(h=n[u])[0],c=h[1];r[l]=new L.Vector(c)}for(u=0;u<s.length;u++){var h,d=(h=s[u])[0],f=h[1];o.insert(d),i[d]=f}return o.finish(),t.fields=e.fields,t.fieldVectors=r,t.invertedIndex=i,t.tokenSet=o.root,t.pipeline=a,new L.Index(t)},L.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=L.tokenizer,this.pipeline=new L.Pipeline,this.searchPipeline=new L.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},L.Builder.prototype.ref=function(e){this._ref=e},L.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},L.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},L.Builder.prototype.k1=function(e){this._k1=e},L.Builder.prototype.add=function(e,t){var r=e[this._ref],n=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var i=0;i<n.length;i++){var s=n[i],o=this._fields[s].extractor,a=o?o(e):e[s],u=this.tokenizer(a,{fields:[s]}),l=this.pipeline.run(u),c=new L.FieldRef(r,s),h=Object.create(null);this.fieldTermFrequencies[c]=h,this.fieldLengths[c]=0,this.fieldLengths[c]+=l.length;for(var d=0;d<l.length;d++){var f=l[d];if(null==h[f]&&(h[f]=0),h[f]+=1,null==this.invertedIndex[f]){var p=Object.create(null);p._index=this.termIndex,this.termIndex+=1;for(var y=0;y<n.length;y++)p[n[y]]=Object.create(null);this.invertedIndex[f]=p}null==this.invertedIndex[f][s][r]&&(this.invertedIndex[f][s][r]=Object.create(null));for(var m=0;m<this.metadataWhitelist.length;m++){var g=this.metadataWhitelist[m],v=f.metadata[g];null==this.invertedIndex[f][s][r][g]&&(this.invertedIndex[f][s][r][g]=[]),this.invertedIndex[f][s][r][g].push(v)}}}},L.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,r={},n={},i=0;i<t;i++){var s=L.FieldRef.fromString(e[i]),o=s.fieldName;n[o]||(n[o]=0),n[o]+=1,r[o]||(r[o]=0),r[o]+=this.fieldLengths[s]}var a=Object.keys(this._fields);for(i=0;i<a.length;i++){var u=a[i];r[u]=r[u]/n[u]}this.averageFieldLength=r},L.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),r=t.length,n=Object.create(null),i=0;i<r;i++){for(var s=L.FieldRef.fromString(t[i]),o=s.fieldName,a=this.fieldLengths[s],u=new L.Vector,l=this.fieldTermFrequencies[s],c=Object.keys(l),h=c.length,d=this._fields[o].boost||1,f=this._documents[s.docRef].boost||1,p=0;p<h;p++){var y,m,g,v=c[p],x=l[v],w=this.invertedIndex[v]._index;void 0===n[v]?(y=L.idf(this.invertedIndex[v],this.documentCount),n[v]=y):y=n[v],m=y*((this._k1+1)*x)/(this._k1*(1-this._b+this._b*(a/this.averageFieldLength[o]))+x),m*=d,m*=f,g=Math.round(1e3*m)/1e3,u.insert(w,g)}e[s]=u}this.fieldVectors=e},L.Builder.prototype.createTokenSet=function(){this.tokenSet=L.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},L.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new L.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},L.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},L.MatchData=function(e,t,r){for(var n=Object.create(null),i=Object.keys(r||{}),s=0;s<i.length;s++){var o=i[s];n[o]=r[o].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=n)},L.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r<t.length;r++){var n=t[r],i=Object.keys(e.metadata[n]);null==this.metadata[n]&&(this.metadata[n]=Object.create(null));for(var s=0;s<i.length;s++){var o=i[s],a=Object.keys(e.metadata[n][o]);null==this.metadata[n][o]&&(this.metadata[n][o]=Object.create(null));for(var u=0;u<a.length;u++){var l=a[u];null==this.metadata[n][o][l]?this.metadata[n][o][l]=e.metadata[n][o][l]:this.metadata[n][o][l]=this.metadata[n][o][l].concat(e.metadata[n][o][l])}}}},L.MatchData.prototype.add=function(e,t,r){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=r);if(t in this.metadata[e])for(var n=Object.keys(r),i=0;i<n.length;i++){var s=n[i];s in this.metadata[e][t]?this.metadata[e][t][s]=this.metadata[e][t][s].concat(r[s]):this.metadata[e][t][s]=r[s]}else this.metadata[e][t]=r},L.Query=function(e){this.clauses=[],this.allFields=e},L.Query.wildcard=new String("*"),L.Query.wildcard.NONE=0,L.Query.wildcard.LEADING=1,L.Query.wildcard.TRAILING=2,L.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},L.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=L.Query.wildcard.NONE),e.wildcard&L.Query.wildcard.LEADING&&e.term.charAt(0)!=L.Query.wildcard&&(e.term="*"+e.term),e.wildcard&L.Query.wildcard.TRAILING&&e.term.slice(-1)!=L.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=L.Query.presence.OPTIONAL),this.clauses.push(e),this},L.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=L.Query.presence.PROHIBITED)return!1;return!0},L.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach((function(e){this.term(e,L.utils.clone(t))}),this),this;var r=t||{};return r.term=e.toString(),this.clause(r),this},L.QueryParseError=function(e,t,r){this.name="QueryParseError",this.message=e,this.start=t,this.end=r},L.QueryParseError.prototype=new Error,L.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},L.QueryLexer.prototype.run=function(){for(var e=L.QueryLexer.lexText;e;)e=e(this)},L.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,r=this.pos,n=0;n<this.escapeCharPositions.length;n++)r=this.escapeCharPositions[n],e.push(this.str.slice(t,r)),t=r+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},L.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},L.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},L.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return L.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},L.QueryLexer.prototype.width=function(){return this.pos-this.start},L.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},L.QueryLexer.prototype.backup=function(){this.pos-=1},L.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=L.QueryLexer.EOS&&this.backup()},L.QueryLexer.prototype.more=function(){return this.pos<this.length},L.QueryLexer.EOS="EOS",L.QueryLexer.FIELD="FIELD",L.QueryLexer.TERM="TERM",L.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",L.QueryLexer.BOOST="BOOST",L.QueryLexer.PRESENCE="PRESENCE",L.QueryLexer.lexField=function(e){return e.backup(),e.emit(L.QueryLexer.FIELD),e.ignore(),L.QueryLexer.lexText},L.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(L.QueryLexer.TERM)),e.ignore(),e.more())return L.QueryLexer.lexText},L.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(L.QueryLexer.EDIT_DISTANCE),L.QueryLexer.lexText},L.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(L.QueryLexer.BOOST),L.QueryLexer.lexText},L.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(L.QueryLexer.TERM)},L.QueryLexer.termSeparator=L.tokenizer.separator,L.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==L.QueryLexer.EOS)return L.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return L.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(L.QueryLexer.TERM),L.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(L.QueryLexer.TERM),L.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(L.QueryLexer.PRESENCE),L.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(L.QueryLexer.PRESENCE),L.QueryLexer.lexText;if(t.match(L.QueryLexer.termSeparator))return L.QueryLexer.lexTerm}else e.escapeCharacter()}},L.QueryParser=function(e,t){this.lexer=new L.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},L.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=L.QueryParser.parseClause;e;)e=e(this);return this.query},L.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},L.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},L.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},L.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case L.QueryLexer.PRESENCE:return L.QueryParser.parsePresence;case L.QueryLexer.FIELD:return L.QueryParser.parseField;case L.QueryLexer.TERM:return L.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new L.QueryParseError(r,t.start,t.end)}},L.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=L.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=L.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new L.QueryParseError(r,t.start,t.end)}var n=e.peekLexeme();if(null==n)throw r="expecting term or field, found nothing",new L.QueryParseError(r,t.start,t.end);switch(n.type){case L.QueryLexer.FIELD:return L.QueryParser.parseField;case L.QueryLexer.TERM:return L.QueryParser.parseTerm;default:throw r="expecting term or field, found '"+n.type+"'",new L.QueryParseError(r,n.start,n.end)}}},L.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),n="unrecognised field '"+t.str+"', possible fields: "+r;throw new L.QueryParseError(n,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i)throw n="expecting term, found nothing",new L.QueryParseError(n,t.start,t.end);switch(i.type){case L.QueryLexer.TERM:return L.QueryParser.parseTerm;default:throw n="expecting term, found '"+i.type+"'",new L.QueryParseError(n,i.start,i.end)}}},L.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case L.QueryLexer.TERM:return e.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return e.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return e.nextClause(),L.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+r.type+"'";throw new L.QueryParseError(n,r.start,r.end)}else e.nextClause()}},L.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="edit distance must be numeric";throw new L.QueryParseError(n,t.start,t.end)}e.currentClause.editDistance=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case L.QueryLexer.TERM:return e.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return e.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return e.nextClause(),L.QueryParser.parsePresence;default:throw n="Unexpected lexeme type '"+i.type+"'",new L.QueryParseError(n,i.start,i.end)}else e.nextClause()}},L.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var n="boost must be numeric";throw new L.QueryParseError(n,t.start,t.end)}e.currentClause.boost=r;var i=e.peekLexeme();if(null!=i)switch(i.type){case L.QueryLexer.TERM:return e.nextClause(),L.QueryParser.parseTerm;case L.QueryLexer.FIELD:return e.nextClause(),L.QueryParser.parseField;case L.QueryLexer.EDIT_DISTANCE:return L.QueryParser.parseEditDistance;case L.QueryLexer.BOOST:return L.QueryParser.parseBoost;case L.QueryLexer.PRESENCE:return e.nextClause(),L.QueryParser.parsePresence;default:throw n="Unexpected lexeme type '"+i.type+"'",new L.QueryParseError(n,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(n=function(){return L})?n.call(t,r,t,e):n)||(e.exports=i)}()},813:function(e){e.exports=function(){"use strict";var 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(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(){function e(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=r,this.iframes=n,this.exclude=i,this.iframesTimeout=s}return r(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var r=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||r||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=void 0;try{var i=e.contentWindow;if(n=i.document,!i||!n)throw new Error("iframe inaccessible")}catch(e){r()}n&&t(n)}},{key:"isIframeBlank",value:function(e){var t="about:blank",r=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&r!==t&&r}},{key:"observeIframeLoad",value:function(e,t,r){var n=this,i=!1,s=null,o=function o(){if(!i){i=!0,clearTimeout(s);try{n.isIframeBlank(e)||(e.removeEventListener("load",o),n.getIframeContents(e,t,r))}catch(e){r()}}};e.addEventListener("load",o),s=setTimeout(o,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,r){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,r):this.getIframeContents(e,t,r):this.observeIframeLoad(e,t,r)}catch(e){r()}}},{key:"waitForIframes",value:function(e,t){var r=this,n=0;this.forEachIframe(e,(function(){return!0}),(function(e){n++,r.waitForIframes(e.querySelector("html"),(function(){--n||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,r,n){var i=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=t.querySelectorAll("iframe"),a=o.length,u=0;o=Array.prototype.slice.call(o);var l=function(){--a<=0&&s(u)};a||l(),o.forEach((function(t){e.matches(t,i.exclude)?l():i.onIframeReady(t,(function(e){r(t)&&(u++,n(e)),l()}),l)}))}},{key:"createIterator",value:function(e,t,r){return document.createNodeIterator(e,t,r,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,r){if(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,r,n){var i=!1,s=!1;return n.forEach((function(e,t){e.val===r&&(i=t,s=e.handled)})),this.compareNodeIframe(e,t,r)?(!1!==i||s?!1===i||s||(n[i].handled=!0):n.push({val:r,handled:!0}),!0):(!1===i&&n.push({val:r,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,r,n){var i=this;e.forEach((function(e){e.handled||i.getIframeContents(e.val,(function(e){i.createInstanceOnIframe(e).forEachNode(t,r,n)}))}))}},{key:"iterateThroughNodes",value:function(e,t,r,n,i){for(var s=this,o=this.createIterator(t,e,n),a=[],u=[],l=void 0,c=void 0;h=void 0,h=s.getIteratorNode(o),c=h.prevNode,l=h.node;)this.iframes&&this.forEachIframe(t,(function(e){return s.checkIframeFilter(l,c,e,a)}),(function(t){s.createInstanceOnIframe(t).forEachNode(e,(function(e){return u.push(e)}),n)})),u.push(l);var h;u.forEach((function(e){r(e)})),this.iframes&&this.handleOpenIframes(a,e,r,n),i()}},{key:"forEachNode",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},s=this.getContexts(),o=s.length;o||i(),s.forEach((function(s){var a=function(){n.iterateThroughNodes(e,s,t,r,(function(){--o<=0&&i()}))};n.iframes?n.waitForIframes(s,a):a()}))}}],[{key:"matches",value:function(e,t){var r="string"==typeof t?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){var i=!1;return r.every((function(t){return!n.call(e,t)||(i=!0,!1)})),i}return!1}}]),e}(),s=function(){function s(e){t(this,s),this.ctx=e,this.ie=!1;var r=window.navigator.userAgent;(r.indexOf("MSIE")>-1||r.indexOf("Trident")>-1)&&(this.ie=!0)}return r(s,[{key:"log",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",n=this.opt.log;this.opt.debug&&"object"===(void 0===n?"undefined":e(n))&&"function"==typeof n[r]&&n[r]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,r=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var s=t[i],o="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s);""!==o&&""!==a&&(e=e.replace(new RegExp("("+this.escapeStr(o)+"|"+this.escapeStr(a)+")","gm"+r),n+"("+this.processSynomyms(o)+"|"+this.processSynomyms(a)+")"+n))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":""}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":""}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,r){var n=r.charAt(t+1);return/[(|)\\]/.test(n)||""===n?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],r=this.opt.ignorePunctuation;return Array.isArray(r)&&r.length&&t.push(this.escapeStr(r.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",r=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],n=[];return e.split("").forEach((function(i){r.every((function(r){if(-1!==r.indexOf(i)){if(n.indexOf(r)>-1)return!1;e=e.replace(new RegExp("["+r+"]","gm"+t),"["+r+"]"),n.push(r)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,r=this.opt.accuracy,n="string"==typeof r?r:r.value,i="string"==typeof r?[]:r.limiters,s="";switch(i.forEach((function(e){s+="|"+t.escapeStr(e)})),n){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+s+"]*)";case"exactly":return"(^|\\s"+s+")("+e+")(?=$|\\s"+s+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,r=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===r.indexOf(e)&&r.push(e)})):e.trim()&&-1===r.indexOf(e)&&r.push(e)})),{keywords:r.sort((function(e,t){return t.length-e.length})),length:r.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var r=[],n=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var i=t.callNoMatchOnInvalidRanges(e,n),s=i.start,o=i.end;i.valid&&(e.start=s,e.length=o-s,r.push(e),n=o)})),r}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var r=void 0,n=void 0,i=!1;return e&&void 0!==e.start?(n=(r=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-r>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:r,end:n,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,r){var n=void 0,i=!0,s=r.length,o=t-s,a=parseInt(e.start,10)-o;return(n=(a=a>s?s:a)+parseInt(e.length,10))>s&&(n=s,this.log("End range automatically set to the max value of "+s)),a<0||n-a<0||a>s||n>s?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===r.substring(a,n).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:n,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,r="",n=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){n.push({start:r.length,end:(r+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:r,nodes:n})}))}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,r){var n=this.opt.element?this.opt.element:"mark",i=e.splitText(t),s=i.splitText(r-t),o=document.createElement(n);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=i.textContent,i.parentNode.replaceChild(o,i),s}},{key:"wrapRangeInMappedTextNode",value:function(e,t,r,n,i){var s=this;e.nodes.every((function(o,a){var u=e.nodes[a+1];if(void 0===u||u.start>t){if(!n(o.node))return!1;var l=t-o.start,c=(r>o.end?o.end:r)-o.start,h=e.value.substr(0,o.start),d=e.value.substr(c+o.start);if(o.node=s.wrapRangeInTextNode(o.node,l,c),e.value=h+d,e.nodes.forEach((function(t,r){r>=a&&(e.nodes[r].start>0&&r!==a&&(e.nodes[r].start-=c),e.nodes[r].end-=c)})),r-=c,i(o.node.previousSibling,o.start),!(r>o.end))return!1;t=o.end}return!0}))}},{key:"wrapMatches",value:function(e,t,r,n,i){var s=this,o=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[o];)if(r(i[o],t)){var a=i.index;if(0!==o)for(var u=1;u<o;u++)a+=i[u].length;t=s.wrapRangeInTextNode(t,a,a+i[o].length),n(t.previousSibling),e.lastIndex=0}})),i()}))}},{key:"wrapMatchesAcrossElements",value:function(e,t,r,n,i){var s=this,o=0===t?0:t+1;this.getTextNodes((function(t){for(var a=void 0;null!==(a=e.exec(t.value))&&""!==a[o];){var u=a.index;if(0!==o)for(var l=1;l<o;l++)u+=a[l].length;var c=u+a[o].length;s.wrapRangeInMappedTextNode(t,u,c,(function(e){return r(a[o],e)}),(function(t,r){e.lastIndex=r,n(t)}))}i()}))}},{key:"wrapRangeFromIndex",value:function(e,t,r,n){var i=this;this.getTextNodes((function(s){var o=s.value.length;e.forEach((function(e,n){var a=i.checkWhitespaceRanges(e,o,s.value),u=a.start,l=a.end;a.valid&&i.wrapRangeInMappedTextNode(s,u,l,(function(r){return t(r,e,s.value.substring(u,l),n)}),(function(t){r(t,e)}))})),n()}))}},{key:"unwrapMatches",value:function(e){for(var t=e.parentNode,r=document.createDocumentFragment();e.firstChild;)r.appendChild(e.removeChild(e.firstChild));t.replaceChild(r,e),this.ie?this.normalizeTextNode(t):t.normalize()}},{key:"normalizeTextNode",value:function(e){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}},{key:"markRegExp",value:function(e,t){var r=this;this.opt=t,this.log('Searching with expression "'+e+'"');var n=0,i="wrapMatches";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),this[i](e,this.opt.ignoreGroups,(function(e,t){return r.opt.filter(t,e,n)}),(function(e){n++,r.opt.each(e)}),(function(){0===n&&r.opt.noMatch(e),r.opt.done(n)}))}},{key:"mark",value:function(e,t){var r=this;this.opt=t;var n=0,i="wrapMatches",s=this.getSeparatedKeywords("string"==typeof e?[e]:e),o=s.keywords,a=s.length,u=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),0===a?this.opt.done(n):function e(t){var s=new RegExp(r.createRegExp(t),"gm"+u),l=0;r.log('Searching with expression "'+s+'"'),r[i](s,1,(function(e,i){return r.opt.filter(i,t,n,l)}),(function(e){l++,n++,r.opt.each(e)}),(function(){0===l&&r.opt.noMatch(t),o[a-1]===t?r.opt.done(n):e(o[o.indexOf(t)+1])}))}(o[0])}},{key:"markRanges",value:function(e,t){var r=this;this.opt=t;var n=0,i=this.checkRanges(e);i&&i.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(i)),this.wrapRangeFromIndex(i,(function(e,t,n,i){return r.opt.filter(e,t,n,i)}),(function(e,t){n++,r.opt.each(e,t)}),(function(){r.opt.done(n)}))):this.opt.done(n)}},{key:"unmark",value:function(e){var t=this;this.opt=e;var r=this.opt.element?this.opt.element:"*";r+="[data-markjs]",this.opt.className&&(r+="."+this.opt.className),this.log('Removal selector "'+r+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,(function(e){t.unwrapMatches(e)}),(function(e){var n=i.matches(e,r),s=t.matchesExclude(e);return!n||s?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),this.opt.done)}},{key:"opt",set:function(e){this._opt=n({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:window.console},e)},get:function(){return this._opt}},{key:"iterator",get:function(){return new i(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),s}();return function(e){var t=this,r=new s(e);return this.mark=function(e,n){return r.mark(e,n),t},this.markRegExp=function(e,n){return r.markRegExp(e,n),t},this.markRanges=function(e,n){return r.markRanges(e,n),t},this.unmark=function(e){return r.unmark(e),t},this}}()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(336),t=r.n(e),n=r(813),i=r.n(n);let s,o,a;const u=(t,r)=>{if(null==t||null==t)return[];let n=t.toString().trim().toLowerCase(),i=[];for(let t=0;t<=n.length-2;t++){let s=e.utils.clone(r)||{};s.position=[t,t+2],s.index=i.length,i.push(new e.Token(n.slice(t,t+2),s))}return i};(()=>{let e=new XMLHttpRequest;e.open("GET","../post/index.json",!0),e.onload=function(){this.status>=200&&this.status<400?(a=JSON.parse(this.response),s=t()((function(){this.tokenizer=u,this.pipeline.reset(),this.ref("ref"),this.field("title",{boost:10}),this.field("body"),this.metadataWhitelist=["position"],a.forEach((e=>{this.add(e)}),this)}))):console.error("Error getting Hugo index flie")},e.onerror=function(){console.error("connection error")},e.send()})(),(()=>{const e=document.querySelector("#searchBox");null!==e&&e.addEventListener("keyup",(function(e){let t=document.querySelector("#searchResults"),r=e.currentTarget.value;r.length<2?t.style.display="none":((e=>{const t=document.querySelector("#searchResults"),r=document.querySelector("#searchBox").value;for(;t.firstChild;)t.removeChild(t.firstChild);if(!e.length){let e=document.createElement("div");return e.className="searchResultPage",e.innerHTML='No results found for query "'+r+'"',void t.append(e)}let n=new(i())(document.querySelector("#searchResults"));e.slice(0,10).forEach(((e,i)=>{let s=document.createElement("div");s.className="searchResultPage";let a=o[i].matchData.metadata,u=a[Object.keys(a)[0]].body.position[0][0],l=u-50>0?u-50:0,c=document.createElement("a");c.className="searchResultTitle",c.href=e.ref,c.innerHTML=e.title,s.append(c);let h=document.createElement("div");h.className="searchResultBody",h.innerHTML=e.body.substr(l,100),s.append(h),t.append(s),n.mark(r)}))})((e=>(o=s.search((e=>{const t=e.toString().trim().toLowerCase(),r=[];for(let e=0;e<=t.length-2;e++)r.push(t.slice(e,e+2));return r.join(" ")})(e)),o.map((e=>a.filter((t=>t.ref===e.ref))[0]))))(r)),t.style.display="block")}))})()})()})();