!function(t,e,n){"use strict";functiono(t,e,n){try{t.call(e,n)}catch(t){console.log(t)}}t.Element&&function(t){t.matches=t.matches||t.matchesSelector||t.webkitMatchesSelector||t.msMatchesSelector||function(t){for(vare=this,n=(e.parentNode||e.document).querySelectorAll(t),o=-1;n[++o]&&n[o]!=e;);return!!n[o]}}(Element.prototype),n=n||{},n.on=function(t,n,a,i){i=i||!1,"string"!=typeoft?t.addEventListener(n,a,i):e.addEventListener(n,function(n){for(vari=n.target||n.srcElement,r=!1;i&&i.matches&&i!==e&&!(r=i.matches(t));)i=i.parentElement;r&&o(a,i,n)},i)},n.ready=function(e){"loading"!=document.readyState?e.call(t):t.addEventListener("DOMContentLoaded",e.bind(t))},n.http=function(t,e,n){varo=newXMLHttpRequest,a=function(){},i=function(){},r={then:function(t){returna=t,r},catch:function(t){returni=t,r}};try{o.open(t,e,!0),o.onload=function(){200==o.status?a(o.response,o.responseType):i(Error(o.statusText))},o.onerror=function(){i(Error("Network Error"))},o.onabort=function(){i(Error("Transaction is aborted"))},o.send()}catch(t){i(t)}returnr},n.loadStyle=function(t){varo=n.staticPath+t,a="style_"+t.replace(".","_"),i=e.getElementById(a);null===i&&((i=e.createElement("link")).setAttribute("id",a),i.setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",o),e.body.appendChild(i))},n.loadScript=function(t,o){vara=n.staticPath+t,i="script_"+t.replace(".","_"),r=e.getElementById(i);if(null===r)(r=e.createElement("script")).setAttribute("id",i),r.setAttribute("src",a),r.onload=o,r.onerror=function(){r.setAttribute("error","1")},e.body.appendChild(r);elseif(r.hasAttribute("error"))console.log("callback not executed : script '"+a+"' not loaded.");elsetry{o.apply(r,[])}catch(t){console.log(t)}},n.on(".close","click",function(t){t.target||t.srcElement;this.parentNode.style.display="None"})}(window,document,window.searx),function(t){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=t();elseif("function"==typeofdefine&&define.amd)define([],t);else{("undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this).AutoComplete=t()}}(function(){returnfunctiont(e,n,o){functiona(r,s){if(!n[r]){if(!e[r]){varl="function"==typeofrequire&&require;if(!s&&l)returnl(r,!0);if(i)returni(r,!0);varu=newError("Cannot find module '"+r+"'");throwu.code="MODULE_NOT_FOUND",u}varc=n[r]={exports:{}};e[r][0].call(c.exports,function(t){varn=e[r][1][t];returna(n||t)},c,c.exports,t,e,n,o)}returnn[r].exports}for(vari="function"==typeofrequire&&require,r=0;r<o.length;r++)a(o[r]);returna}({1:[function(t,e,n){/*
*@licenseMIT
*
*Autocomplete.jsv2.6.3
*DevelopedbyBaptisteDonaux
*http://autocomplete-js.com
*
*(c)2017,BaptisteDonaux
*/
"use strict";varo;!function(t){t[t.AND=0]="AND",t[t.OR=1]="OR"}(o||(o={}));vara;!function(t){t[t.KEYDOWN=0]="KEYDOWN",t[t.KEYUP=1]="KEYUP"}(a||(a={}));vari=function(){functiont(e,n){if(void0===e&&(e={}),void0===n&&(n="[data-autocomplete]"),Array.isArray(n))n.forEach(function(n){newt(e,n)});else{if("string"!=typeofn){varo=t.merge(t.defaults,e,{DOMResults:document.createElement("div")});returnt.prototype.create(o,n),o}vara=document.querySelectorAll(n);Array.prototype.forEach.call(a,function(n){newt(e,n)})}}returnt.prototype.create=function(e,n){if(e.Input=n,e.Input.nodeName.match(/^INPUT$/i)&&(!1===e.Input.hasAttribute("type")||e.Input.getAttribute("type").match(/^TEXT|SEARCH$/i))){e.Input.setAttribute("autocomplete","off"),e._Position(e),e.Input.parentNode.appendChild(e.DOMResults),e.$Listeners={blur:e._Blur.bind(e),destroy:t.prototype.destroy.bind(null,e),focus:e._Focus.bind(e),keyup:t.prototype.event.bind(null,e,a.KEYUP),keydown:t.prototype.event.bind(null,e,a.KEYDOWN),position:e._Position.bind(e)};for(varoine.$Listeners)e.Input.addEventListener(o,e.$Listeners[o])}},t.prototype.getEventsByType=function(t,e){varn={};for(varoint.KeyboardMappings){vari=a.KEYUP;void0!==t.KeyboardMappings[o].Event&&(i=t.KeyboardMappings[o].Event),i==e&&(n[o]=t.KeyboardMappings[o])}returnn},t.prototype.event=function(e,n,a){for(variint.prototype.getEventsByType(e,n)){varr=t.merge({Operator:o.AND},e.KeyboardMappings[i]),s=o.AND==r.Operator;r.Conditions.forEach(function(e){(!0===s&&r.Operator==o.AND||!1===s&&r.Operator==o.OR)&&((e=t.merge({Not:!1},e)).hasOwnProperty("Is")?s=e.Is==a.keyCode?!e.Not:e.Not:e.hasOwnProperty("From")&&e.hasOwnProperty("To")&&(s=a.keyCode>=e.From&&a.keyCode<=e.To?!e.Not:e.Not))}),!0===s&&r.Callback.call(e,a)}},t.prototype.makeRequest=function(t,e){varn=Object.getOwnPropertyNames(t.HttpHeaders),o=newXMLHttpRequest,a=t._HttpMethod(),i=t._Url(),r=t._Pre(),s=encodeURIComponent(t._QueryArg())+"="+encodeURIComponent(r);a.match(/^GET$/i)&&(-1!==i.indexOf("?")?i+="&"+s:i+="?"+s),o.open(a,i,!0);for(varl=n.length-1;l>=0;l--)o.setRequestHeader(n[l],t.HttpHeaders[n[l]]);returno.onreadystatechange=function(){4==o.readyState&&200==o.status&&(t.$Cache[r]=o.response,e(o.response))},o},t.prototype.ajax=function(e,n,o){void0===o&&(o=!0),e.$AjaxTimer&&window.clearTimeout(e.$AjaxTimer),!0===o?e.$AjaxTimer=window.setTimeout(t.prototype.ajax.bind(null,e,n,!1),e.Delay):(e.Request&&e.Request.abort(),e.Request=n,e.Request.send(e._QueryArg()+"="+e._Pre()))},t.prototype.cache=function(e,n){varo=e._Cache(e._Pre());if(void0===o){vara=t.prototype.makeRequest(e,n);t.prototype.ajax(e,a)}elsen(o)},t.prototype.destroy=function(t){for(vareint.$Listeners)t.Input.removeEventListener(e,t.$Listeners[e]);t.DOMResults.parentNode.removeChild(t.DOMResults)},t}();i.merge=function(){for(vart,e={},n=0;n<arguments.length;n++)for(tinarguments[n])e[t]=arguments[n][t];returne},i.defaults={Delay:150,EmptyMessage:"No result here",Highlight:{getRegex:function(t){returnnewRegExp(t,"ig")},transform:function(t){return"<strong>"+t+"</strong>"}},HttpHeaders:{"Content-type":"application/x-www-form-urlencoded"},Limit:0,MinChars:0,HttpMethod:"GET",QueryArg:"q",Url:null,KeyboardMappings:{Enter:{Conditions:[{Is:13,Not:!1}],Callback:function(t){if(-1!=this.DOMResults.getAttribute("class").indexOf("open")){vare=this.DOMResults.querySelector("li.active");null!==e&&(t.preventDefault(),this._Select(e),this.DOMResults.setAttribute("class","autocomplete"))}},Operator:o.AND,Event:a.KEYDOWN},KeyUpAndDown_down:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault()},Operator:o.OR,Event:a.KEYDOWN},KeyUpAndDown_up:{Conditions:[{Is:38,Not:!1},{Is:40,Not:!1}],Callback:function(t){t.preventDefault();vare=this.DOMResults.querySelector("li:first-child:not(.locked)"),n=this.DOMResults.querySelector("li:last-child:not(.locked)"),o=this.DOMResults.querySelector("li.active");if(o){vara=Array.prototype.indexOf.call(o.parentNode.children,o)+(t.keyCode-39),i=this.DOMResults.getElementsByTagName("li").length;a<0?a=i-1:a>=i&&(a=0)
*
*GoogleImageLayoutv0.0.1
*Description,byAnhTrinh.
*Heavilymodifiedforsearx
*http://trinhtrunganh.com
*
*@licenseFreetouseundertheMITLicense.
*
*/
function(t,e){"use strict";functionn(t,e,n,o){this.container_selector=t,this.results_selector=e,this.img_selector=n,this.margin=10,this.maxHeight=o,this._alignAllDone=!0}n.prototype._getHeigth=function(t,e){varn,o=0;e-=t.length*this.margin;for(vara=0;a<t.length;a++)(n=t[a]).naturalWidth>0&&n.naturalHeight>0?o+=n.naturalWidth/n.naturalHeight:o+=1;returne/o},n.prototype._setSize=function(t,e){for(varn,o,a=t.length,i=0;i<a;i++)o=(n=t[i]).naturalWidth>0&&n.naturalHeight>0?e*n.naturalWidth/n.naturalHeight:e,n.style.width=o+"px",n.style.height=e+"px",n.style.marginLeft="3px",n.style.marginTop="3px",n.style.marginRight=this.margin-7+"px",n.style.marginBottom=this.margin-7+"px"},n.prototype._alignImgs=function(t){varn,o,a=e.querySelector(this.container_selector).clientWidth;t:for(;t.length>0;){for(vari=1;i<=t.length;i++)if(n=t.slice(0,i),(o=this._getHeigth(n,a))<this.maxHeight){this._setSize(n,o),t=t.slice(i);continuet}this._setSize(n,Math.min(this.maxHeight,o));break}},n.prototype.align=function(t){for(varn=e.querySelectorAll(this.results_selector),o=n.length,a=null,i=null,r=[],s=0;s<o;s++)(i=n[s]).previousElementSibling!==a&&r.length>0&&(this._alignImgs(r),r=[]),r.push(i.querySelector(this.img_selector)),a=i;r.length>0&&this._alignImgs(r)},n.prototype.watch=function(){functionn(t){i._alignAllDone&&(i._alignAllDone=!1,setTimeout(function(){i.align(),i._alignAllDone=!0},100))}varo,a,i=this,r=e.querySelectorAll(this.results_selector),s=r.length;for(t.addEventListener("resize",n),t.addEventListener("pageshow",function(t){i.align()}),o=0;o<s;o++)void0!==(a=r[o].querySelector(this.img_selector))&&(a.addEventListener("load",n),a.addEventListener("error",n))},t.searx.ImageLayout=n}(window,document),searx.ready(function(){functiont(t){returnfunction(e){varo=document.querySelector(".result[data-vim-selected]"),a=t;if(null===o){if(null===(o=document.querySelector(".result")))return;"down"!==t&&"up"!==t||(a=o)}vari,r=document.querySelectorAll(".result");if("string"!=typeofa)i=a;elseswitch(a){case"visible":for(vars=document.documentElement.scrollTop||document.body.scrollTop,l=s+document.documentElement.clientHeight,u=0;u<r.length;u++){varc=(i=r[u]).offsetTop;if(c+i.clientHeight<=l&&c>s)break}break;case"down":null===(i=o.nextElementSibling)&&(i=r[0]);break;case"up":null===(i=o.previousElementSibling)&&(i=r[r.length-1]);break;case"bottom":i=r[r.length-1];break;case"top":default:i=r[0]}if(i){o.removeAttribute("data-vim-selected"),i.setAttribute("data-vim-selected","true");vard=i.querySelector("h3 a")||i.querySelector("a");null!==d&&d.focus(),e||n()}}}functione(t){returnfunction(){vare=$('div#pagination button[type="submit"]');2===e.length?t>=0&&t<e.length?e[t].click():console.log("pageButtonClick(): invalid argument"):console.log("page navigation with this theme is not supported")}}functionn(){vart=document.querySelector(".result[data-vim-selected]");if(null!==t){vare=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,o=t.offsetTop,a=o+t.clientHeight;null===t.previousElementSibling&&a<n?window.scroll(window.scrollX,0):e>o-120?window.scroll(window.scrollX,o-120):e+n<a+120&&window.scroll(window.scrollX,a-n+120)}}functiono(e){returnfunction(){window.scrollBy(0,e),t("visible")()}}functiona(e,n){returnfunction(){window.scrollTo(0,e),t(n)()}}functioni(t){returnfunction(){vare=document.querySelector(".result[data-vim-selected] h3 a");if(null!==e){varn=e.getAttribute("href");t?window.open(n):window.location.href=n}}}searx.on(".result","click",function(){t(this)(!0)}),searx.on(".result a","focus",function(e){for(varn=e.target;void0!==n;){if(n.classList.contains("result")){null===n.getAttribute("data-vim-selected")&&t(n)(!0);break}n=n.parentNode}},!0);varr={27:{key:"Escape",fun:function(){document.activeElement&&document.activeElement.blur()},des:"remove focus from the focused input",cat:"Control"},73:{key:"i",fun:function(){window.scrollTo(0,0),document.querySelector("#q").focus()},des:"focus on the search input",cat:"Control"},66:{key:"b",fun:o(-window.innerHeight