var e=this,t=function(){"use strict";function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n,s=0;se.length)&&(t=e.length);for(var n=0,s=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:3,e=new Map,t=Math.pow(10,n);return{get:function(n){if(s=n.match(O).length,e.has(s))return e.get(s);var s,i=1/Math.sqrt(s),o=parseFloat(Math.round(i*t)/t);return e.set(s,o),o},clear:function(){e.clear()}}}c=function(){function o(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.getFn,s=void 0===t?e.getFn:t;r(this,o),this.norm=M(3),this.getFn=s,this.isCreated=!1,this.setIndexRecords()}return a(o,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=e,this._keysMap={},e.forEach(function(e,n){t._keysMap[e.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,n(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();n(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},o=i.getFn,a=void 0===o?e.getFn:o,s=new c({getFn:a});return s.setKeys(t.map(j)),s.setSources(n),s.create(),s}function i(t){var s,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=n.errors,f=void 0===d?0:d,l=n.currentLocation,u=void 0===l?0:l,a=n.expectedLocation,h=void 0===a?0:a,r=n.distance,c=void 0===r?e.distance:r,i=n.ignoreLocation,m=void 0===i?e.ignoreLocation:i,o=f/t.length;return m?o:(s=Math.abs(h-u),c?o+s/c:s?1:o)}function A(){for(var i,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.minMatchCharLength,o=[],t=-1,r=-1,n=0,c=s.length;n=a&&o.push([t,r]),t=-1);return s[n-1]&&n-t>=a&&o.push([t,n-1]),o}function S(e){for(var s,n={},t=0,o=e.length;t1&&void 0!==arguments[1]?arguments[1]:{},u=s.location,x=void 0===u?e.location:u,p=s.threshold,w=void 0===p?e.threshold:p,l=s.distance,k=void 0===l?e.distance:l,h=s.includeMatches,C=void 0===h?e.includeMatches:h,f=s.findAllMatches,O=void 0===f?e.findAllMatches:f,g=s.minMatchCharLength,y=void 0===g?e.minMatchCharLength:g,d=s.isCaseSensitive,b=void 0===d?e.isCaseSensitive:d,v=s.ignoreLocation,_=void 0===v?e.ignoreLocation:v;if(r(this,t),this.options={location:x,threshold:w,distance:k,includeMatches:C,findAllMatches:O,minMatchCharLength:y,isCaseSensitive:b,ignoreLocation:_},this.pattern=b?n:n.toLowerCase(),this.chunks=[],this.pattern.length)if(i=function(e,t){j.chunks.push({pattern:e,alphabet:S(e),startIndex:t})},o=this.pattern.length,o>32){for(var a=0,m=o%32,E=o-m;a3&&void 0!==arguments[3]?arguments[3]:{},$=c.location,U=void 0===$?e.location:$,F=c.distance,j=void 0===F?e.distance:F,N=c.threshold,q=void 0===N?e.threshold:N,V=c.findAllMatches,K=void 0===V?e.findAllMatches:V,z=c.minMatchCharLength,T=void 0===z?e.minMatchCharLength:z,P=c.includeMatches,W=void 0===P?e.includeMatches:P,L=c.ignoreLocation,y=void 0===L?e.ignoreLocation:L;if(n.length>32)throw new Error(R(32));for(var _,d=n.length,g=t.length,a=Math.max(0,Math.min(U,g)),m=q,h=a,v=T>1||W,k=v?Array(g):[];(_=t.indexOf(n,h))>-1;)if(D=i(n,{currentLocation:_,expectedLocation:a,distance:j,ignoreLocation:y}),m=Math.min(D,m),h=_+d,v)for(x=0;x=I;o-=1)if(p=o-1,M=s[t.charAt(p)],v&&(k[p]=+!!M),u[o]=(u[o+1]<<1|1)&M,l&&(u[o]|=(O[o+1]|O[o])<<1|1|O[o+1]),u[o]&Y&&(E=i(n,{errors:l,currentLocation:p,expectedLocation:a,distance:j,ignoreLocation:y}))<=m){if(m=E,(h=p)<=a)break;I=Math.max(1,2*a-h)}if(B=i(n,{errors:l+1,currentLocation:a,expectedLocation:a,distance:j,ignoreLocation:y}),B>m)break;O=u}return b={isMatch:h>=0,score:Math.max(.001,E)},v&&(S=A(k,T),S.length?W&&(b.indices=S):b.isMatch=!1),b}(t,b,j,{location:v+y,distance:h,threshold:g,findAllMatches:p,minMatchCharLength:m,includeMatches:r,ignoreLocation:f}),c=a.isMatch,_=a.score,d=a.indices;c&&(s=!0),u+=_,c&&d&&(o=[].concat(l(o),l(d)))}),a={isMatch:s,score:s?u/this.chunks.length:1},s&&r&&(a.indices=o),a}}]),t}(),u=[];function b(e,t){for(var s,n=0,o=u.length;n-1&&(s.refIndex=e.idx),n.matches.push(s)}})}function N(e,t){t.score=e.score}function L(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.includeMatches,r=void 0===i?e.includeMatches:i,a=o.includeScore,c=void 0===a?e.includeScore:a,s=[];return r&&s.push(D),c&&s.push(N),t.map(function(e){var t=e.idx,o={item:n[t],refIndex:t};return s.length&&s.forEach(function(t){t(e,o)}),o})}return o=function(){function o(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;if(r(this,o),this.options=w({},e,{},n),this.options.useExtendedSearch)throw new Error("Extended search is not available");this._keyStore=new T(this.options.keys),this.setCollection(t,s)}return a(o,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof c))throw new Error("Incorrect 'index' type");this._myIndex=t||f(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){t(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},n=[],e=0,s=this._docs.length;e1&&void 0!==arguments[1]?arguments[1]:{},i=a.limit,o=void 0===i?-1:i,t=this.options,r=t.includeMatches,c=t.includeScore,l=t.shouldSort,d=t.sortFn,u=t.ignoreFieldNorm,s=n(e)?n(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return z(s,{ignoreFieldNorm:u}),l&&s.sort(d),C(o)&&o>-1&&(s=s.slice(0,o)),L(s,this._docs,{includeMatches:r,includeScore:c})}},{key:"_searchStringList",value:function(e){var s=b(e,this.options),o=this._myIndex.records,n=[];return o.forEach(function(e){var o=e.v,a=e.i,r=e.n;if(t(o)){var i=s.searchIn(o),c=i.isMatch,l=i.score,d=i.indices;c&&n.push({item:o,idx:a,matches:[{score:l,value:o,norm:r,indices:d}]})}}),n}},{key:"_searchLogical",value:function(){throw new Error("Logical search is not available")}},{key:"_searchObjectList",value:function(e){var o=this,i=b(e,this.options),n=this._myIndex,a=n.keys,r=n.records,s=[];return r.forEach(function(e){var n,r=e.$,c=e.i;t(r)&&(n=[],a.forEach(function(e,t){n.push.apply(n,l(o._findMatches({key:e,value:r[t],searcher:i})))}),n.length&&s.push({idx:c,item:r,matches:n}))}),s}},{key:"_findMatches",value:function(e){var a=e.key,n=e.value,r=e.searcher;if(!t(n))return[];if(o=[],s(n))n.forEach(function(e){var n=e.v,i=e.i,c=e.n;if(t(n)){var s=r.searchIn(n),l=s.isMatch,d=s.score,u=s.indices;l&&o.push({score:d,key:a,value:n,idx:i,norm:c,indices:u})}});else{var o,c=n.v,l=n.n,i=r.searchIn(c),d=i.isMatch,u=i.score,h=i.indices;d&&o.push({score:u,key:a,value:c,norm:l,indices:h})}return o}}]),o}(),o.version="6.4.6",o.createIndex=f,o.parseIndex=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.getFn,i=void 0===s?e.getFn:s,a=t.keys,r=t.records,n=new c({getFn:i});return n.setKeys(a),n.setIndexRecords(r),n},o.config=e,o};"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(),(()=>{var i,r,c,e=null,n=document.getElementById("searchResults"),t=document.getElementById("searchInput"),a=null,s=!1;window.onload=function(){var t=new XMLHttpRequest;t.onreadystatechange=function(){if(t.readyState===4)if(t.status===200){var n,s=JSON.parse(t.responseText);s&&(n={distance:100,threshold:.4,ignoreLocation:!0,keys:["title","permalink","summary","content"]},e&&(n={isCaseSensitive:!!e.iscasesensitive&&e.iscasesensitive,includeScore:!!e.includescore&&e.includescore,includeMatches:!!e.includematches&&e.includematches,minMatchCharLength:e.minmatchcharlength?e.minmatchcharlength:1,shouldSort:!e.shouldsort||e.shouldsort,findAllMatches:!!e.findallmatches&&e.findallmatches,keys:e.keys?e.keys:["title","permalink","summary","content"],location:e.location?e.location:0,threshold:e.threshold?e.threshold:.4,distance:e.distance?e.distance:100,ignoreLocation:!e.ignorelocation||e.ignorelocation}),i=new Fuse(s,n))}else console.log(t.responseText)},t.open("GET","../index.json"),t.send()};function o(e){document.querySelectorAll(".focus").forEach(function(e){e.classList.remove("focus")}),e?(e.focus(),document.activeElement=a=e,e.parentElement.classList.add("focus")):document.activeElement.parentElement.classList.add("focus")}function l(){s=!1,n.innerHTML=t.value="",t.focus()}t.onkeyup=function(){if(i){const e=i.search(this.value.trim());if(e.length!==0){let t="";for(let n in e)t+=`
  • ${e[n].item.title} \xBB
  • `;n.innerHTML=t,s=!0,r=n.firstChild,c=n.lastChild}else s=!1,n.innerHTML=""}},t.addEventListener("search",function(){this.value||l()}),document.onkeydown=function(e){let d=e.key;var u,i=document.activeElement;let h=document.getElementById("searchbox").contains(i);if(i===t)for(u=document.getElementsByClassName("focus");u.length>0;)u[0].classList.remove("focus");else a&&(i=a);if(d==="Escape")l();else if(!s||!h)return;else d==="ArrowDown"?(e.preventDefault(),i==t?o(n.firstChild.lastChild):i.parentElement!=c&&o(i.parentElement.nextSibling.lastChild)):d==="ArrowUp"?(e.preventDefault(),i.parentElement==r?o(t):i!=t&&o(i.parentElement.previousSibling.lastChild)):d==="ArrowRight"&&i.click()}})()