aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/resources/html/quick-jump.min.js
diff options
context:
space:
mode:
authorTim Baumann <tim@timbaumann.info>2017-09-23 22:02:01 +0200
committerAlexander Biehl <alexbiehl@gmail.com>2017-09-23 22:02:01 +0200
commite99aefb50ca63e2dbcc95841efbb53cea90151d8 (patch)
tree3ab0cebcd012122631336281dceb389dd0fd4506 /haddock-api/resources/html/quick-jump.min.js
parentfe4c6c7d2907a79118d836e72c0442d666091524 (diff)
Add compile step that bundles and compresses JS files (#684)
* Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme
Diffstat (limited to 'haddock-api/resources/html/quick-jump.min.js')
-rw-r--r--haddock-api/resources/html/quick-jump.min.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/haddock-api/resources/html/quick-jump.min.js b/haddock-api/resources/html/quick-jump.min.js
new file mode 100644
index 00000000..c9f2b445
--- /dev/null
+++ b/haddock-api/resources/html/quick-jump.min.js
@@ -0,0 +1,2 @@
+!function t(e,n,o){function r(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return r(n||t)},u,u.exports,t,e,n,o)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(t,e,n){"use strict";function o(t,e,n){var o=new XMLHttpRequest;o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&(200===o.status?e&&e(JSON.parse(o.responseText)):n&&n(o))},o.open("GET",t,!0),o.send()}function r(t){var e=document.querySelector("#page-menu"),n=document.createElement("li");e.insertBefore(n,e.firstChild),p.render(f(v,{onClick:t,title:"Quick Jump"}),e,n)}function i(t,e){return e.length<=t?e:e.slice(0,t)}function s(){return f("table",{class:"keyboard-shortcuts"},f("tr",null,f("th",null,"Key"),f("th",null,"Shortcut")),f("tr",null,f("td",null,f("span",{class:"key"},"s")),f("td",null,"Open this search box")),f("tr",null,f("td",null,f("span",{class:"key"},"esc")),f("td",null,"Close this search box")),f("tr",null,f("td",null,f("span",{class:"key"},"↓"),",",f("span",{class:"key"},"ctrl")," + ",f("span",{class:"key"},"j")),f("td",null,"Move down in search results")),f("tr",null,f("td",null,f("span",{class:"key"},"↑"),",",f("span",{class:"key"},"ctrl")," + ",f("span",{class:"key"},"k")),f("td",null,"Move up in search results")),f("tr",null,f("td",null,f("span",{class:"key"},"↵")),f("td",null,"Go to active search result")))}function a(){return f("p",null,"You can find any exported type, constructor, class, function or pattern defined in this package by (approximate) name.")}function l(t){var e=[f("p",null,"Your search for '",t.searchString,"' produced the following list of results: ",f("code",null,"[]"),"."),f("p",null,f("code",null,"Nothing")," matches your query for '",t.searchString,"'."),f("p",null,f("code",null,"Left \"no matches for '",t.searchString,"'\" :: Either String (NonEmpty SearchResult)"))];return e[(t.searchString||"a").charCodeAt(0)%e.length]}function c(t,e){p.render(f(_,{baseUrl:t||".",showHideTrigger:e||r}),document.body)}var u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();Object.defineProperty(n,"__esModule",{value:!0});var h=t("fuse.js"),p=t("preact"),f=p.h,d=p.Component,v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.render=function(t){return f("li",null,f("a",{href:"#",onClick:function(e){e.preventDefault(),t.onClick()}},t.title))},e}(d),_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.linkIndex=0,e.focusPlease=!1,e.navigatedByKeyboard=!1,e}return u(e,t),e.prototype.componentWillMount=function(){var t=this;this.setState({searchString:"",isVisible:!1,expanded:{},activeLinkIndex:-1,moduleResults:[]}),o(this.props.baseUrl+"/doc-index.json",function(e){t.setState({fuse:new h(e,{threshold:.4,caseSensitive:!0,includeScore:!0,tokenize:!0,keys:["name","module"]}),moduleResults:[]})},function(e){console&&console.error("could not load 'doc-index.json' for searching",e),t.setState({failedLoading:!0})}),document.addEventListener("mousedown",this.hide.bind(this)),document.addEventListener("keydown",function(e){t.state.isVisible&&("Escape"===e.key?t.hide():"ArrowUp"===e.key||"k"===e.key&&e.ctrlKey?(e.preventDefault(),t.navigateLinks(-1)):"ArrowDown"===e.key||"j"===e.key&&e.ctrlKey?(e.preventDefault(),t.navigateLinks(1)):"Enter"===e.key&&t.state.activeLinkIndex>=0&&t.followActiveLink()),"s"===e.key&&"input"!==e.target.tagName.toLowerCase()&&(e.preventDefault(),t.show())})},e.prototype.hide=function(){this.setState({isVisible:!1})},e.prototype.show=function(){this.state.isVisible||(this.focusPlease=!0,this.setState({isVisible:!0,activeLinkIndex:-1}))},e.prototype.toggleVisibility=function(){this.state.isVisible?this.hide():this.show()},e.prototype.navigateLinks=function(t){var e=Math.max(-1,Math.min(this.linkIndex-1,this.state.activeLinkIndex+t));this.navigatedByKeyboard=!0,this.setState({activeLinkIndex:e})},e.prototype.followActiveLink=function(){this.activeLinkAction&&this.activeLinkAction()},e.prototype.updateResults=function(){var t=this.input&&this.input.value||"",e={};this.state.fuse.search(t).forEach(function(t){var n=t.item.module;(e[n]||(e[n]=[])).push(t)});var n=[];for(var o in e)!function(t){var o=e[t],r=0;o.forEach(function(t){r+=1/t.score}),n.push({module:t,totalScore:1/r,items:o})}(o);n.sort(function(t,e){return t.totalScore-e.totalScore}),this.setState({searchString:t,isVisible:!0,moduleResults:n})},e.prototype.componentDidUpdate=function(){if(this.searchResults&&this.activeLink&&this.navigatedByKeyboard){var t=this.activeLink.getClientRects()[0],e=this.searchResults.getClientRects()[0].top;t.bottom>window.innerHeight?this.searchResults.scrollTop+=t.bottom-window.innerHeight+80:t.top<e&&(this.searchResults.scrollTop-=e-t.top+80)}this.focusPlease&&this.input&&this.input.focus(),this.navigatedByKeyboard=!1,this.focusPlease=!1},e.prototype.componentDidMount=function(){this.props.showHideTrigger(this.toggleVisibility.bind(this))},e.prototype.render=function(t,e){var n=this;if(e.failedLoading)return null;this.linkIndex=0;var o=function(t){t.stopPropagation()},r=i(10,e.moduleResults).map(function(t){return n.renderResultsInModule(t)});return f("div",{id:"search",class:e.isVisible?"":"hidden"},f("div",{id:"search-form",onMouseDown:o},f("input",{placeholder:"Search in package by name",ref:function(t){n.input=t},onFocus:this.show.bind(this),onClick:this.show.bind(this),onInput:this.updateResults.bind(this)})),f("div",{id:"search-results",ref:function(t){n.searchResults=t},onMouseDown:o,onMouseOver:function(t){for(var e=t.target;e&&"function"==typeof e.getAttribute;){var o=e.getAttribute("data-link-index");if("string"==typeof o){var r=parseInt(o,10);n.setState({activeLinkIndex:r});break}e=e.parentNode}}},""===e.searchString?[f(a,null),f(s,null)]:0==r.length?f(l,{searchString:e.searchString}):f("ul",null,r)))},e.prototype.renderResultsInModule=function(t){var e=this,n=t.items,o=t.module,r=this.state.expanded[o]||n.length<=10,s=r?n:i(8,n),a=function(t){return f("li",{class:"search-result"},e.navigationLink(e.props.baseUrl+"/"+t.link,{},f(g,{html:t.display_html})))};return f("li",{class:"search-module"},f("h4",null,o),f("ul",null,s.map(function(t){return a(t.item)}),r?[]:f("li",{class:"more-results"},this.actionLink(function(){var t=Object.assign({},e.state.expanded);t[o]=!0,e.setState({expanded:t})},{},"show "+(n.length-s.length)+" more results from this module"))))},e.prototype.navigationLink=function(t,e){for(var n=this,o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];var i=Object.assign({href:t,onClick:this.hide.bind(this)},e);return this.menuLink.apply(this,[i,function(){window.location.href=t,n.hide()}].concat(o))},e.prototype.actionLink=function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var r=Object.assign({href:"#",onClick:function(e){e.preventDefault(),t()}},e);return this.menuLink.apply(this,[r,t].concat(n))},e.prototype.menuLink=function(t,e){for(var n=this,o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];var i=this.linkIndex;i===this.state.activeLinkIndex&&(t.class=(t.class?t.class+" ":"")+"active-link",t.ref=function(t){t&&(n.activeLink=t)},this.activeLinkAction=e);var s=Object.assign({"data-link-index":i},t);return this.linkIndex+=1,f.apply(void 0,["a",s].concat(o))},e}(d),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.shouldComponentUpdate=function(t){return this.props.html!==t.html},e.prototype.render=function(t){return f("div",{dangerouslySetInnerHTML:{__html:t.html}})},e}(d);n.init=c,window.quickNav={init:c}},{"fuse.js":2,preact:3}],2:[function(t,e,n){!function(t,o){"object"==typeof n&&"object"==typeof e?e.exports=o():"function"==typeof define&&define.amd?define("Fuse",[],o):"object"==typeof n?n.Fuse=o():t.Fuse=o()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=8)}([function(t,e,n){"use strict";t.exports=function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(5),s=n(7),a=n(4),l=function(){function t(e,n){var r=n.location,i=void 0===r?0:r,s=n.distance,l=void 0===s?100:s,c=n.threshold,u=void 0===c?.6:c,h=n.maxPatternLength,p=void 0===h?32:h,f=n.isCaseSensitive,d=void 0!==f&&f,v=n.tokenSeparator,_=void 0===v?/ +/g:v,g=n.findAllMatches,m=void 0!==g&&g,y=n.minMatchCharLength,k=void 0===y?1:y;o(this,t),this.options={location:i,distance:l,threshold:u,maxPatternLength:p,isCaseSensitive:d,tokenSeparator:_,findAllMatches:m,minMatchCharLength:k},this.pattern=this.options.isCaseSensitive?e:e.toLowerCase(),this.pattern.length<=p&&(this.patternAlphabet=a(this.pattern))}return r(t,[{key:"search",value:function(t){if(this.options.isCaseSensitive||(t=t.toLowerCase()),this.pattern===t)return{isMatch:!0,score:0,matchedIndices:[[0,t.length-1]]};var e=this.options,n=e.maxPatternLength,o=e.tokenSeparator;if(this.pattern.length>n)return i(t,this.pattern,o);var r=this.options,a=r.location,l=r.distance,c=r.threshold,u=r.findAllMatches,h=r.minMatchCharLength;return s(t,this.pattern,this.patternAlphabet,{location:a,distance:l,threshold:c,findAllMatches:u,minMatchCharLength:h})}}]),t}();t.exports=l},function(t,e,n){"use strict";var o=n(0),r=function t(e,n,r){if(n){var i=n.indexOf("."),s=n,a=null;-1!==i&&(s=n.slice(0,i),a=n.slice(i+1));var l=e[s];if(null!==l&&void 0!==l)if(a||"string"!=typeof l&&"number"!=typeof l)if(o(l))for(var c=0,u=l.length;c<u;c+=1)t(l[c],a,r);else a&&t(l,a,r);else r.push(l.toString())}else r.push(e);return r};t.exports=function(t,e){return r(t,e,[])}},function(t,e,n){"use strict";t.exports=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],o=-1,r=-1,i=0,s=t.length;i<s;i+=1){var a=t[i];a&&-1===o?o=i:a||-1===o||((r=i-1)-o+1>=e&&n.push([o,r]),o=-1)}return t[i-1]&&i-o>=e&&n.push([o,i-1]),n}},function(t,e,n){"use strict";t.exports=function(t){for(var e={},n=t.length,o=0;o<n;o+=1)e[t.charAt(o)]=0;for(var r=0;r<n;r+=1)e[t.charAt(r)]|=1<<n-r-1;return e}},function(t,e,n){"use strict";var o=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;t.exports=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,r=new RegExp(e.replace(o,"\\$&").replace(n,"|")),i=t.match(r),s=!!i,a=[];if(s)for(var l=0,c=i.length;l<c;l+=1){var u=i[l];a.push([t.indexOf(u),u.length-1])}return{score:s?.5:1,isMatch:s,matchedIndices:a}}},function(t,e,n){"use strict";t.exports=function(t,e){var n=e.errors,o=void 0===n?0:n,r=e.currentLocation,i=void 0===r?0:r,s=e.expectedLocation,a=void 0===s?0:s,l=e.distance,c=void 0===l?100:l,u=o/t.length,h=Math.abs(a-i);return c?u+h/c:h?1:u}},function(t,e,n){"use strict";var o=n(6),r=n(3);t.exports=function(t,e,n,i){for(var s=i.location,a=void 0===s?0:s,l=i.distance,c=void 0===l?100:l,u=i.threshold,h=void 0===u?.6:u,p=i.findAllMatches,f=void 0!==p&&p,d=i.minMatchCharLength,v=void 0===d?1:d,_=a,g=t.length,m=h,y=t.indexOf(e,_),k=e.length,b=[],x=0;x<g;x+=1)b[x]=0;if(-1!==y){var S=o(e,{errors:0,currentLocation:y,expectedLocation:_,distance:c});if(m=Math.min(S,m),-1!==(y=t.lastIndexOf(e,_+k))){var w=o(e,{errors:0,currentLocation:y,expectedLocation:_,distance:c});m=Math.min(w,m)}}y=-1;for(var L=[],C=1,M=k+g,N=1<<k-1,I=0;I<k;I+=1){for(var A=0,O=M;A<O;)o(e,{errors:I,currentLocation:_+O,expectedLocation:_,distance:c})<=m?A=O:M=O,O=Math.floor((M-A)/2+A);M=O;var T=Math.max(1,_-O+1),P=f?g:Math.min(_+O,g)+k,j=Array(P+2);j[P+1]=(1<<I)-1;for(var E=P;E>=T;E-=1){var R=E-1,U=n[t.charAt(R)];if(U&&(b[R]=1),j[E]=(j[E+1]<<1|1)&U,0!==I&&(j[E]|=(L[E+1]|L[E])<<1|1|L[E+1]),j[E]&N&&(C=o(e,{errors:I,currentLocation:R,expectedLocation:_,distance:c}))<=m){if(m=C,(y=R)<=_)break;T=Math.max(1,2*_-y)}}if(o(e,{errors:I+1,currentLocation:_,expectedLocation:_,distance:c})>m)break;L=j}return{isMatch:y>=0,score:0===C?.001:C,matchedIndices:r(b,v)}}},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(1),s=n(2),a=n(0),l=function(){function t(e,n){var r=n.location,i=void 0===r?0:r,a=n.distance,l=void 0===a?100:a,c=n.threshold,u=void 0===c?.6:c,h=n.maxPatternLength,p=void 0===h?32:h,f=n.caseSensitive,d=void 0!==f&&f,v=n.tokenSeparator,_=void 0===v?/ +/g:v,g=n.findAllMatches,m=void 0!==g&&g,y=n.minMatchCharLength,k=void 0===y?1:y,b=n.id,x=void 0===b?null:b,S=n.keys,w=void 0===S?[]:S,L=n.shouldSort,C=void 0===L||L,M=n.getFn,N=void 0===M?s:M,I=n.sortFn,A=void 0===I?function(t,e){return t.score-e.score}:I,O=n.tokenize,T=void 0!==O&&O,P=n.matchAllTokens,j=void 0!==P&&P,E=n.includeMatches,R=void 0!==E&&E,U=n.includeScore,D=void 0!==U&&U,V=n.verbose,F=void 0!==V&&V;o(this,t),this.options={location:i,distance:l,threshold:u,maxPatternLength:p,isCaseSensitive:d,tokenSeparator:_,findAllMatches:m,minMatchCharLength:k,id:x,keys:w,includeMatches:R,includeScore:D,shouldSort:C,getFn:N,sortFn:A,verbose:F,tokenize:T,matchAllTokens:j},this.setCollection(e)}return r(t,[{key:"setCollection",value:function(t){return this.list=t,t}},{key:"search",value:function(t){this._log('---------\nSearch pattern: "'+t+'"');var e=this._prepareSearchers(t),n=e.tokenSearchers,o=e.fullSearcher,r=this._search(n,o),i=r.weights,s=r.results;return this._computeScore(i,s),this.options.shouldSort&&this._sort(s),this._format(s)}},{key:"_prepareSearchers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=[];if(this.options.tokenize)for(var n=t.split(this.options.tokenSeparator),o=0,r=n.length;o<r;o+=1)e.push(new i(n[o],this.options));return{tokenSearchers:e,fullSearcher:new i(t,this.options)}}},{key:"_search",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n=this.list,o={},r=[];if("string"==typeof n[0]){for(var i=0,s=n.length;i<s;i+=1)this._analyze({key:"",value:n[i],record:i,index:i},{resultMap:o,results:r,tokenSearchers:t,fullSearcher:e});return{weights:null,results:r}}for(var a={},l=0,c=n.length;l<c;l+=1)for(var u=n[l],h=0,p=this.options.keys.length;h<p;h+=1){var f=this.options.keys[h];if("string"!=typeof f){if(a[f.name]={weight:1-f.weight||1},f.weight<=0||f.weight>1)throw new Error("Key weight has to be > 0 and <= 1");f=f.name}else a[f]={weight:1};this._analyze({key:f,value:this.options.getFn(u,f),record:u,index:l},{resultMap:o,results:r,tokenSearchers:t,fullSearcher:e})}return{weights:a,results:r}}},{key:"_analyze",value:function(t,e){var n=t.key,o=t.arrayIndex,r=void 0===o?-1:o,i=t.value,s=t.record,l=t.index,c=e.tokenSearchers,u=void 0===c?[]:c,h=e.fullSearcher,p=void 0===h?[]:h,f=e.resultMap,d=void 0===f?{}:f,v=e.results,_=void 0===v?[]:v;if(void 0!==i&&null!==i){var g=!1,m=-1,y=0;if("string"==typeof i){this._log("\nKey: "+(""===n?"-":n));var k=p.search(i);if(this._log('Full text: "'+i+'", score: '+k.score),this.options.tokenize){for(var b=i.split(this.options.tokenSeparator),x=[],S=0;S<u.length;S+=1){var w=u[S];this._log('\nPattern: "'+w.pattern+'"');for(var L=!1,C=0;C<b.length;C+=1){var M=b[C],N=w.search(M),I={};N.isMatch?(I[M]=N.score,g=!0,L=!0,x.push(N.score)):(I[M]=1,this.options.matchAllTokens||x.push(1)),this._log('Token: "'+M+'", score: '+I[M])}L&&(y+=1)}m=x[0];for(var A=x.length,O=1;O<A;O+=1)m+=x[O];m/=A,this._log("Token score average:",m)}var T=k.score;m>-1&&(T=(T+m)/2),this._log("Score average:",T);var P=!this.options.tokenize||!this.options.matchAllTokens||y>=u.length;if(this._log("\nCheck Matches: "+P),(g||k.isMatch)&&P){var j=d[l];j?j.output.push({key:n,arrayIndex:r,value:i,score:T,matchedIndices:k.matchedIndices}):(d[l]={item:s,output:[{key:n,arrayIndex:r,value:i,score:T,matchedIndices:k.matchedIndices}]},_.push(d[l]))}}else if(a(i))for(var E=0,R=i.length;E<R;E+=1)this._analyze({key:n,arrayIndex:E,value:i[E],record:s,index:l},{resultMap:d,results:_,tokenSearchers:u,fullSearcher:p})}}},{key:"_computeScore",value:function(t,e){this._log("\n\nComputing score:\n");for(var n=0,o=e.length;n<o;n+=1){for(var r=e[n].output,i=r.length,s=0,a=1,l=0;l<i;l+=1){var c=r[l].score,u=t?t[r[l].key].weight:1,h=c*u;1!==u?a=Math.min(a,h):(r[l].nScore=h,s+=h)}e[n].score=1===a?s/i:a,this._log(e[n])}}},{key:"_sort",value:function(t){this._log("\n\nSorting...."),t.sort(this.options.sortFn)}},{key:"_format",value:function(t){var e=[];this._log("\n\nOutput:\n\n",JSON.stringify(t));var n=[];this.options.includeMatches&&n.push(function(t,e){var n=t.output;e.matches=[];for(var o=0,r=n.length;o<r;o+=1){var i=n[o];if(0!==i.matchedIndices.length){var s={indices:i.matchedIndices,value:i.value};i.key&&(s.key=i.key),i.hasOwnProperty("arrayIndex")&&i.arrayIndex>-1&&(s.arrayIndex=i.arrayIndex),e.matches.push(s)}}}),this.options.includeScore&&n.push(function(t,e){e.score=t.score});for(var o=0,r=t.length;o<r;o+=1){var i=t[o];if(this.options.id&&(i.item=this.options.getFn(i.item,this.options.id)[0]),n.length){for(var s={item:i.item},a=0,l=n.length;a<l;a+=1)n[a](i,s);e.push(s)}else e.push(i.item)}return e}},{key:"_log",value:function(){if(this.options.verbose){var t;(t=console).log.apply(t,arguments)}}}]),t}();t.exports=l}])})},{}],3:[function(t,e,n){!function(){"use strict";function t(){}function n(e,n){var o,r,i,s,a=O;for(s=arguments.length;s-- >2;)A.push(arguments[s]);for(n&&null!=n.children&&(A.length||A.push(n.children),delete n.children);A.length;)if((r=A.pop())&&void 0!==r.pop)for(s=r.length;s--;)A.push(r[s]);else"boolean"==typeof r&&(r=null),(i="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(i=!1)),i&&o?a[a.length-1]+=r:a===O?a=[r]:a.push(r),o=i;var l=new t;return l.nodeName=e,l.children=a,l.attributes=null==n?void 0:n,l.key=null==n?void 0:n.key,void 0!==I.vnode&&I.vnode(l),l}function o(t,e){for(var n in e)t[n]=e[n];return t}function r(t){!t.__d&&(t.__d=!0)&&1==j.push(t)&&(I.debounceRendering||T)(i)}function i(){var t,e=j;for(j=[];t=e.pop();)t.__d&&L(t)}function s(t,e,n){return"string"==typeof e||"number"==typeof e?void 0!==t.splitText:"string"==typeof e.nodeName?!t._componentConstructor&&a(t,e.nodeName):n||t._componentConstructor===e.nodeName}function a(t,e){return t.__n===e||t.nodeName.toLowerCase()===e.toLowerCase()}function l(t){var e=o({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===e[r]&&(e[r]=n[r]);return e}function c(t,e){var n=e?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t);return n.__n=t,n}function u(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,n,o,r){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)n&&n(null),o&&o(t);else if("class"!==e||r)if("style"===e){if(o&&"string"!=typeof o&&"string"!=typeof n||(t.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var i in n)i in o||(t.style[i]="");for(var i in o)t.style[i]="number"==typeof o[i]&&!1===P.test(i)?o[i]+"px":o[i]}}else if("dangerouslySetInnerHTML"===e)o&&(t.innerHTML=o.__html||"");else if("o"==e[0]&&"n"==e[1]){var s=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),o?n||t.addEventListener(e,f,s):t.removeEventListener(e,f,s),(t.__l||(t.__l={}))[e]=o}else if("list"!==e&&"type"!==e&&!r&&e in t)p(t,e,null==o?"":o),null!=o&&!1!==o||t.removeAttribute(e);else{var a=r&&e!==(e=e.replace(/^xlink\:?/,""));null==o||!1===o?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof o&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),o):t.setAttribute(e,o))}else t.className=o||""}function p(t,e,n){try{t[e]=n}catch(t){}}function f(t){return this.__l[t.type](I.event&&I.event(t)||t)}function d(){for(var t;t=E.pop();)I.afterMount&&I.afterMount(t),t.componentDidMount&&t.componentDidMount()}function v(t,e,n,o,r,i){R++||(U=null!=r&&void 0!==r.ownerSVGElement,D=null!=t&&!("__preactattr_"in t));var s=_(t,e,n,o,i);return r&&s.parentNode!==r&&r.appendChild(s),--R||(D=!1,i||d()),s}function _(t,e,n,o,r){var i=t,s=U;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||r)?t.nodeValue!=e&&(t.nodeValue=e):(i=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(i,t),m(t,!0))),i.__preactattr_=!0,i;var l=e.nodeName;if("function"==typeof l)return C(t,e,n,o);if(U="svg"===l||"foreignObject"!==l&&U,l=String(l),(!t||!a(t,l))&&(i=c(l,U),t)){for(;t.firstChild;)i.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(i,t),m(t,!0)}var u=i.firstChild,h=i.__preactattr_,p=e.children;if(null==h){h=i.__preactattr_={};for(var f=i.attributes,d=f.length;d--;)h[f[d].name]=f[d].value}return!D&&p&&1===p.length&&"string"==typeof p[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=p[0]&&(u.nodeValue=p[0]):(p&&p.length||null!=u)&&g(i,p,n,o,D||null!=h.dangerouslySetInnerHTML),k(i,e.attributes,h),U=s,i}function g(t,e,n,o,r){var i,a,l,c,h,p=t.childNodes,f=[],d={},v=0,g=0,y=p.length,k=0,b=e?e.length:0;if(0!==y)for(L=0;L<y;L++){var x=p[L],S=x.__preactattr_;null!=(w=b&&S?x._component?x._component.__k:S.key:null)?(v++,d[w]=x):(S||(void 0!==x.splitText?!r||x.nodeValue.trim():r))&&(f[k++]=x)}if(0!==b)for(L=0;L<b;L++){h=null;var w=(c=e[L]).key;if(null!=w)v&&void 0!==d[w]&&(h=d[w],d[w]=void 0,v--);else if(!h&&g<k)for(i=g;i<k;i++)if(void 0!==f[i]&&s(a=f[i],c,r)){h=a,f[i]=void 0,i===k-1&&k--,i===g&&g++;break}h=_(h,c,n,o),l=p[L],h&&h!==t&&h!==l&&(null==l?t.appendChild(h):h===l.nextSibling?u(l):t.insertBefore(h,l))}if(v)for(var L in d)void 0!==d[L]&&m(d[L],!1);for(;g<=k;)void 0!==(h=f[k--])&&m(h,!1)}function m(t,e){var n=t._component;n?M(n):(null!=t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),!1!==e&&null!=t.__preactattr_||u(t),y(t))}function y(t){for(t=t.lastChild;t;){var e=t.previousSibling;m(t,!0),t=e}}function k(t,e,n){var o;for(o in n)e&&null!=e[o]||null==n[o]||h(t,o,n[o],n[o]=void 0,U);for(o in e)"children"===o||"innerHTML"===o||o in n&&e[o]===("value"===o||"checked"===o?t[o]:n[o])||h(t,o,n[o],n[o]=e[o],U)}function b(t){var e=t.constructor.name;(V[e]||(V[e]=[])).push(t)}function x(t,e,n){var o,r=V[t.name];if(t.prototype&&t.prototype.render?(o=new t(e,n),N.call(o,e,n)):((o=new N(e,n)).constructor=t,o.render=S),r)for(var i=r.length;i--;)if(r[i].constructor===t){o.__b=r[i].__b,r.splice(i,1);break}return o}function S(t,e,n){return this.constructor(t,n)}function w(t,e,n,o,i){t.__x||(t.__x=!0,(t.__r=e.ref)&&delete e.ref,(t.__k=e.key)&&delete e.key,!t.base||i?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,o),o&&o!==t.context&&(t.__c||(t.__c=t.context),t.context=o),t.__p||(t.__p=t.props),t.props=e,t.__x=!1,0!==n&&(1!==n&&!1===I.syncComponentUpdates&&t.base?r(t):L(t,1,i)),t.__r&&t.__r(t))}function L(t,e,n,r){if(!t.__x){var i,s,a,c=t.props,u=t.state,h=t.context,p=t.__p||c,f=t.__s||u,_=t.__c||h,g=t.base,y=t.__b,k=g||y,b=t._component,S=!1;if(g&&(t.props=p,t.state=f,t.context=_,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(c,u,h)?S=!0:t.componentWillUpdate&&t.componentWillUpdate(c,u,h),t.props=c,t.state=u,t.context=h),t.__p=t.__s=t.__c=t.__b=null,t.__d=!1,!S){i=t.render(c,u,h),t.getChildContext&&(h=o(o({},h),t.getChildContext()));var C,N,A=i&&i.nodeName;if("function"==typeof A){var O=l(i);(s=b)&&s.constructor===A&&O.key==s.__k?w(s,O,1,h,!1):(C=s,t._component=s=x(A,O,h),s.__b=s.__b||y,s.__u=t,w(s,O,0,h,!1),L(s,1,n,!0)),N=s.base}else a=k,(C=b)&&(a=t._component=null),(k||1===e)&&(a&&(a._component=null),N=v(a,i,h,n||!g,k&&k.parentNode,!0));if(k&&N!==k&&s!==b){var T=k.parentNode;T&&N!==T&&(T.replaceChild(N,k),C||(k._component=null,m(k,!1)))}if(C&&M(C),t.base=N,N&&!r){for(var P=t,j=t;j=j.__u;)(P=j).base=N;N._component=P,N._componentConstructor=P.constructor}}if(!g||n?E.unshift(t):S||(t.componentDidUpdate&&t.componentDidUpdate(p,f,_),I.afterUpdate&&I.afterUpdate(t)),null!=t.__h)for(;t.__h.length;)t.__h.pop().call(t);R||r||d()}}function C(t,e,n,o){for(var r=t&&t._component,i=r,s=t,a=r&&t._componentConstructor===e.nodeName,c=a,u=l(e);r&&!c&&(r=r.__u);)c=r.constructor===e.nodeName;return r&&c&&(!o||r._component)?(w(r,u,3,n,o),t=r.base):(i&&!a&&(M(i),t=s=null),r=x(e.nodeName,u,n),t&&!r.__b&&(r.__b=t,s=null),w(r,u,1,n,o),t=r.base,s&&t!==s&&(s._component=null,m(s,!1))),t}function M(t){I.beforeUnmount&&I.beforeUnmount(t);var e=t.base;t.__x=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?M(n):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),t.__b=e,u(e),b(t),y(e)),t.__r&&t.__r(null)}function N(t,e){this.__d=!0,this.context=e,this.props=t,this.state=this.state||{}}var I={},A=[],O=[],T="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,P=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,j=[],E=[],R=0,U=!1,D=!1,V={};o(N.prototype,{setState:function(t,e){var n=this.state;this.__s||(this.__s=o({},n)),o(n,"function"==typeof t?t(n,this.props):t),e&&(this.__h=this.__h||[]).push(e),r(this)},forceUpdate:function(t){t&&(this.__h=this.__h||[]).push(t),L(this,2)},render:function(){}});var F={h:n,createElement:n,cloneElement:function(t,e){return n(t.nodeName,o(o({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)},Component:N,render:function(t,e,n){return v(n,t,{},!1,e,!1)},rerender:i,options:I};void 0!==e?e.exports=F:self.preact=F}()},{}]},{},[1]);
+//# sourceMappingURL=quick-jump.min.js.map