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u8qhk*dDU9x2q(e!?
z7+HU|Z2bjrFZ#yMYwu6z;?em%t(n<2w_a0Cn7DT*P33@6dJpZHWtuhvl1VkB?E_2c
z3KNtXCkp6c=|4UJQg%EW
zE^RS&2%klr|NN_b-`9J%xUAbdDR1}LiJM@5Z6D;Pm_(K`JLe~Mt=Y3ytuc9T#NC_U
zAu>f`AxbuV<7z{fy`^2+)V=yw?%@TM9Qyaj|9IOkd&T8Vmk*cT32_HzrA3Nei~kS)
WU~WP<>2rnv0000t.appendChild(e))}function o(o){var e=i.querySelector("#pagination form.next_page");if(!e){return}r(i.querySelector("#pagination"),[n()]);var t=new FormData(e);searxng.http("POST",i.querySelector("#search").getAttribute("action"),t).then(function(e){var t=(new DOMParser).parseFromString(e,"text/html");var n=t.querySelectorAll("#urls article");var r=t.querySelector("#pagination");i.querySelector("#pagination").remove();if(n.length>0&&!s){i.querySelector("#urls").appendChild(i.createElement("hr"))}n.forEach(e=>{i.querySelector("#urls").appendChild(e)});if(r){i.querySelector("#results").appendChild(r);o()}}).catch(function(e){console.log(e);var t=i.createElement("div");t.textContent=searxng.settings.translations.error_loading_next_page;t.classList.add("dialog-error");t.setAttribute("role","alert");r(i.querySelector("#pagination"),[t])})}if(searxng.settings.infinite_scroll&&searxng.infinite_scroll_supported){const a={rootMargin:"20rem"};const l="article.result:last-child";const u=new IntersectionObserver(e=>{const t=e[0];if(t.isIntersecting){u.unobserve(t.target);o(()=>u.observe(i.querySelector(l),a))}});u.observe(i.querySelector(l),a)}});searxng.ready(function(){function e(e){while(e!==undefined){if(e.classList.contains("detail")){return true}if(e.classList.contains("result")){return false}e=e.parentNode}return false}function n(e){while(e!==undefined){if(e.classList.contains("result")){return e}e=e.parentNode}return undefined}function r(e){return e&&e.classList.contains("result-images")}searxng.on(".result","click",function(t){if(!e(t.target)){i(this)(true,true);let e=n(t.target);if(r(e)){t.preventDefault();searxng.selectImage(e)}}});searxng.on(".result a","focus",function(t){if(!e(t.target)){let e=n(t.target);if(e&&e.getAttribute("data-vim-selected")===null){i(e)(true)}if(r(e)){searxng.selectImage(e)}}},true);var t={Escape:{key:"ESC",fun:a,des:"remove focus from the focused input",cat:"Control"},h:{key:"h",fun:v,des:"toggle help window",cat:"Other"},i:{key:"i",fun:h,des:"focus on the search input",cat:"Control"},n:{key:"n",fun:u(),des:"go to next page",cat:"Results"},o:{key:"o",fun:g(false),des:"open search result",cat:"Results"},p:{key:"p",fun:c(),des:"go to previous page",cat:"Results"},r:{key:"r",fun:s,des:"reload page from the server",cat:"Control"},t:{key:"t",fun:g(true),des:"open the result in a new tab",cat:"Results"}};var o={default:Object.assign({ArrowLeft:{key:"←",fun:i("up"),des:"select previous search result",cat:"Results"},ArrowRight:{key:"→",fun:i("down"),des:"select next search result",cat:"Results"}},t),vim:Object.assign({b:{key:"b",fun:f(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},f:{key:"f",fun:f(window.innerHeight),des:"scroll one page down",cat:"Navigation"},u:{key:"u",fun:f(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},d:{key:"d",fun:f(window.innerHeight/2),des:"scroll half a page down",cat:"Navigation"},g:{key:"g",fun:m(-document.body.scrollHeight,"top"),des:"scroll to the top of the page",cat:"Navigation"},v:{key:"v",fun:m(document.body.scrollHeight,"bottom"),des:"scroll to the bottom of the page",cat:"Navigation"},k:{key:"k",fun:i("up"),des:"select previous search result",cat:"Results"},j:{key:"j",fun:i("down"),des:"select next search result",cat:"Results"}},t)};var d=o[searxng.settings.hotkeys]||o.default;searxng.on(document,"keydown",function(e){if(Object.prototype.hasOwnProperty.call(d,e.key)&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=e.target.tagName.toLowerCase();if(e.key==="Escape"){d[e.key].fun(e)}else{if(e.target===document.body||t==="a"||t==="button"){e.preventDefault();d[e.key].fun()}}}});function i(f){return function(e,t){var n=document.querySelector(".result[data-vim-selected]"),r=f;if(n===null){n=document.querySelector(".result");if(n===null){return}if(f==="down"||f==="up"){r=n}}var o,i=document.querySelectorAll(".result");i=Array.from(i);if(typeof r!=="string"){o=r}else{switch(r){case"visible":var s=document.documentElement.scrollTop||document.body.scrollTop;var a=s+document.documentElement.clientHeight;for(var l=0;ls){break}}break;case"down":o=i[i.indexOf(n)+1]||n;break;case"up":o=i[i.indexOf(n)-1]||n;break;case"bottom":o=i[i.length-1];break;case"top":default:o=i[0]}}if(o){n.removeAttribute("data-vim-selected");o.setAttribute("data-vim-selected","true");if(!t){var d=o.querySelector("h3 a")||o.querySelector("a");if(d!==null){d.focus()}}if(!e){p()}}}}function s(){document.location.reload(true)}function a(e){const t=e.target.tagName.toLowerCase();if(document.activeElement&&(t==="input"||t==="select"||t==="textarea")){document.activeElement.blur()}else{searxng.closeDetail()}}function l(t){return function(){var e=document.querySelector(t);if(e){e.click()}}}function u(){return l('nav#pagination .next_page button[type="submit"]')}function c(){return l('nav#pagination .previous_page button[type="submit"]')}function p(){var e=document.querySelector(".result[data-vim-selected]");if(e===null){return}var t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,r=e.offsetTop,o=r+e.clientHeight,i=120;if(e.previousElementSibling===null&&or-i){window.scroll(window.scrollX,r-i)}else{var s=t+n;if(s a")}if(e!==null){var t=e.getAttribute("href");if(n){window.open(t)}else{window.location.href=t}}}}function y(e){var n={};for(var t in d){var r=d[t];n[r.cat]=n[r.cat]||[];n[r.cat].push(r)}var o=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(o.length===0){return}var i='×';i+="How to navigate SearXNG with hotkeys
";i+="";for(var s=0;s"}i+="";i+=""+a[0].cat+"";i+='';for(var c in a){i+="- "+a[c].key+" "+a[c].des+"
"}i+=" ";i+=" | ";if(!u||l){i+=""}}i+="
";e.innerHTML=i}function v(){var e=document.querySelector("#vim-hotkeys-help");if(e===undefined||e===null){e=document.createElement("div");e.id="vim-hotkeys-help";e.className="dialog-modal";y(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}searxng.scrollPageToSelected=p;searxng.selectNext=i("down");searxng.selectPrevious=i("up")});(function(e,t,n){"use strict";n.ready(function(){n.on(".searxng_init_map","click",function(e){this.classList.remove("searxng_init_map");var d=this.dataset.leafletTarget;var f=parseFloat(this.dataset.mapLon);var p=parseFloat(this.dataset.mapLat);var m=parseFloat(this.dataset.mapZoom);var h=JSON.parse(this.dataset.mapBoundingbox);var g=JSON.parse(this.dataset.mapGeojson);n.loadStyle("css/leaflet.css");n.loadScript("js/leaflet.js",function(){var e=null;if(h){var t=L.latLng(h[0],h[2]);var n=L.latLng(h[1],h[3]);e=L.latLngBounds(t,n)}var r=L.map(d);var o="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var i='Map data © OpenStreetMap contributors';var s=new L.TileLayer(o,{minZoom:1,maxZoom:19,attribution:i});var a="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var l='Wikimedia maps | Maps data © OpenStreetMap contributors';var u=new L.TileLayer(a,{minZoom:1,maxZoom:19,attribution:l});if(e){setTimeout(function(){r.fitBounds(e,{maxZoom:17})},0)}else if(f&&p){if(m){r.setView(new L.latLng(p,f),m)}else{r.setView(new L.latLng(p,f),8)}}r.addLayer(s);var c={"OSM Mapnik":s,"OSM Wikimedia":u};L.control.layers(c).addTo(r);if(g){L.geoJson(g).addTo(r)}});e.preventDefault()})})})(window,document,window.searxng);(function(e,i,s){"use strict";if(s.endpoint!=="preferences"){return}s.ready(function(){let o=null;function e(){if(o==null){s.http("GET","engine_descriptions.json").then(function(e){o=JSON.parse(e);for(const[t,n]of Object.entries(o)){let e=i.querySelectorAll('[data-engine-name="'+t+'"] .engine-description');for(const r of e){let e=" ("+s.settings.translations.Source+": "+n[1]+")";r.innerHTML=n[0]+e}}})}}for(const t of i.querySelectorAll("[data-engine-name]")){s.on(t,"mouseenter",e)}})})(window,document,window.searxng);(function(e,a,l){"use strict";if(l.endpoint!=="results"){return}l.ready(function(){a.querySelectorAll("#urls img.image").forEach(e=>e.addEventListener("error",()=>{e.style.display="none";e.error=null}));l.on(".btn-collapse","click",function(){var e=this.getAttribute("data-btn-text-collapsed");var t=this.getAttribute("data-btn-text-not-collapsed");var n=this.getAttribute("data-target");var r=a.querySelector(n);var o=this.innerHTML;if(this.classList.contains("collapsed")){o=o.replace(e,t)}else{o=o.replace(t,e)}this.innerHTML=o;this.classList.toggle("collapsed");r.classList.toggle("invisible")});l.on(".media-loader","click",function(){var e=this.getAttribute("data-target");var t=a.querySelector(e+" > iframe");var n=t.getAttribute("src");if(n===null||n===undefined||n===false){t.setAttribute("src",t.getAttribute("data-src"))}});l.selectImage=function(e){if(e){const t=e.querySelector(".result-images-source img");const n=e.querySelector(".image_thumbnail");const r=e.querySelector(".detail");if(t){const o=t.getAttribute("data-src");if(o){const i=a.createElement("div");const s=new Image;i.classList.add("loader");r.appendChild(i);s.onload=e=>{t.src=o;i.remove()};s.onerror=e=>{i.remove()};s.src=o;t.src=n.src;t.removeAttribute("data-src")}}}a.getElementById("results").classList.add("image-detail-open");l.scrollPageToSelected()};l.closeDetail=function(e){a.getElementById("results").classList.remove("image-detail-open");l.scrollPageToSelected()};l.on(".result-detail-close","click",e=>{e.preventDefault();l.closeDetail()});l.on(".result-detail-previous","click",e=>l.selectPrevious(false));l.on(".result-detail-next","click",e=>l.selectNext(false));e.addEventListener("scroll",function(){var e=a.getElementById("backToTop"),t=document.documentElement.scrollTop||document.body.scrollTop,n=a.getElementById("results");if(e!==null){if(t>=100){n.classList.add("scrolling")}else{n.classList.remove("scrolling")}}},true)})})(window,document,window.searxng);(function(e,t,n){"use strict";var r="q",o;const i=window.matchMedia("only screen and (max-width: 50em)").matches;function s(){if(o.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function a(t){var e=document.getElementById("clear_search");var n=function(){if(t.value.length===0){e.classList.add("empty")}else{e.classList.remove("empty")}};n();e.addEventListener("click",function(e){t.value="";t.focus();n();e.preventDefault()});t.addEventListener("keyup",n,false)}n.ready(function(){o=t.getElementById(r);if(o!==null){a(o);if(n.settings.autocomplete_provider){n.autocomplete=AutoComplete.call(e,{Url:"./autocompleter",EmptyMessage:n.settings.translations.no_item_found,HttpMethod:n.settings.http_method,HttpHeaders:{"Content-type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},MinChars:n.settings.autocomplete_min,Delay:300,_Position:function(){},_Open:function(){var t=this;Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"),function(e){if(e.getAttribute("class")!="locked"){e.onmousedown=function(){t._Select(e)}}})},_Select:function(e){AutoComplete.defaults._Select.call(this,e);var t=e.closest("form");if(t){t.submit()}},_MinChars:function(){if(this.Input.value.indexOf("!")>-1){return 0}else{return AutoComplete.defaults._MinChars.call(this)}},KeyboardMappings:Object.assign({},AutoComplete.defaults.KeyboardMappings,{KeyUpAndDown_up:Object.assign({},AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up,{Callback:function(e){AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up.Callback.call(this,e);var t=this.DOMResults.querySelector("li.active");if(t){AutoComplete.defaults._Select.call(this,t)}}}),Tab:Object.assign({},AutoComplete.defaults.KeyboardMappings.Enter,{Conditions:[{Is:9,Not:false}],Callback:function(e){if(this.DOMResults.getAttribute("class").indexOf("open")!=-1){var t=this.DOMResults.querySelector("li.active");if(t!==null){AutoComplete.defaults._Select.call(this,t);e.preventDefault()}}}})})},"#"+r)}AutoComplete.prototype.ajax=function(e,t,n){if(n===void 0){n=true}if(e.$AjaxTimer){window.clearTimeout(e.$AjaxTimer)}if(n===true){e.$AjaxTimer=window.setTimeout(AutoComplete.prototype.ajax.bind(null,e,t,false),e.Delay)}else{if(e.Request){e.Request.abort()}e.Request=t;e.Request.send(encodeURIComponent(e._QueryArg())+"="+encodeURIComponent(e._Pre()))}};if(!i&&document.querySelector(".index_endpoint")){o.focus()}}if(o!==null&&n.settings.search_on_category_select&&t.querySelector(".search_filters")!=null){n.on(t.getElementById("safesearch"),"change",s);n.on(t.getElementById("time_range"),"change",s);n.on(t.getElementById("language"),"change",s)}try{t.querySelector("html:has(body)")}catch(e){for(let e of t.querySelectorAll("button.category_button")){n.on(e,"click",()=>{const e=t.querySelector("button.category_button.selected");console.log(e);e.classList.remove("selected")})}}})})(window,document,window.searxng);(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.AutoComplete=e()}})(function(){var e,t,n;return function(){function c(i,s,a){function l(n,e){if(!s[n]){if(!i[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var o=s[n]={exports:{}};i[n][0].call(o.exports,function(e){var t=i[n][1][e];return l(t||e)},o,o.exports,c,i,s,a)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;et.appendChild(e))}function o(o){var e=i.querySelector("#pagination form.next_page");if(!e){return}r(i.querySelector("#pagination"),[n()]);var t=new FormData(e);searxng.http("POST",i.querySelector("#search").getAttribute("action"),t).then(function(e){var t=(new DOMParser).parseFromString(e,"text/html");var n=t.querySelectorAll("#urls article");var r=t.querySelector("#pagination");i.querySelector("#pagination").remove();if(n.length>0&&!s){i.querySelector("#urls").appendChild(i.createElement("hr"))}n.forEach(e=>{i.querySelector("#urls").appendChild(e)});if(r){i.querySelector("#results").appendChild(r);o()}}).catch(function(e){console.log(e);var t=i.createElement("div");t.textContent=searxng.settings.translations.error_loading_next_page;t.classList.add("dialog-error");t.setAttribute("role","alert");r(i.querySelector("#pagination"),[t])})}if(searxng.settings.infinite_scroll&&searxng.infinite_scroll_supported){const a={rootMargin:"20rem"};const l="article.result:last-child";const u=new IntersectionObserver(e=>{const t=e[0];if(t.isIntersecting){u.unobserve(t.target);o(()=>u.observe(i.querySelector(l),a))}});u.observe(i.querySelector(l),a)}});searxng.ready(function(){function e(e){while(e!==undefined){if(e.classList.contains("detail")){return true}if(e.classList.contains("result")){return false}e=e.parentNode}return false}function n(e){while(e!==undefined){if(e.classList.contains("result")){return e}e=e.parentNode}return undefined}function r(e){return e&&e.classList.contains("result-images")}searxng.on(".result","click",function(t){if(!e(t.target)){i(this)(true,true);let e=n(t.target);if(r(e)){t.preventDefault();searxng.selectImage(e)}}});searxng.on(".result a","focus",function(t){if(!e(t.target)){let e=n(t.target);if(e&&e.getAttribute("data-vim-selected")===null){i(e)(true)}if(r(e)){searxng.selectImage(e)}}},true);var t={Escape:{key:"ESC",fun:a,des:"remove focus from the focused input",cat:"Control"},h:{key:"h",fun:v,des:"toggle help window",cat:"Other"},i:{key:"i",fun:m,des:"focus on the search input",cat:"Control"},n:{key:"n",fun:u(),des:"go to next page",cat:"Results"},o:{key:"o",fun:g(false),des:"open search result",cat:"Results"},p:{key:"p",fun:c(),des:"go to previous page",cat:"Results"},r:{key:"r",fun:s,des:"reload page from the server",cat:"Control"},t:{key:"t",fun:g(true),des:"open the result in a new tab",cat:"Results"}};var o={default:Object.assign({ArrowLeft:{key:"←",fun:i("up"),des:"select previous search result",cat:"Results"},ArrowRight:{key:"→",fun:i("down"),des:"select next search result",cat:"Results"}},t),vim:Object.assign({b:{key:"b",fun:f(-window.innerHeight),des:"scroll one page up",cat:"Navigation"},f:{key:"f",fun:f(window.innerHeight),des:"scroll one page down",cat:"Navigation"},u:{key:"u",fun:f(-window.innerHeight/2),des:"scroll half a page up",cat:"Navigation"},d:{key:"d",fun:f(window.innerHeight/2),des:"scroll half a page down",cat:"Navigation"},g:{key:"g",fun:h(-document.body.scrollHeight,"top"),des:"scroll to the top of the page",cat:"Navigation"},v:{key:"v",fun:h(document.body.scrollHeight,"bottom"),des:"scroll to the bottom of the page",cat:"Navigation"},k:{key:"k",fun:i("up"),des:"select previous search result",cat:"Results"},j:{key:"j",fun:i("down"),des:"select next search result",cat:"Results"}},t)};var d=o[searxng.settings.hotkeys]||o.default;searxng.on(document,"keydown",function(e){if(Object.prototype.hasOwnProperty.call(d,e.key)&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=e.target.tagName.toLowerCase();if(e.key==="Escape"){d[e.key].fun(e)}else{if(e.target===document.body||t==="a"||t==="button"){e.preventDefault();d[e.key].fun()}}}});function i(f){return function(e,t){var n=document.querySelector(".result[data-vim-selected]"),r=f;if(n===null){n=document.querySelector(".result");if(n===null){return}if(f==="down"||f==="up"){r=n}}var o,i=document.querySelectorAll(".result");i=Array.from(i);if(typeof r!=="string"){o=r}else{switch(r){case"visible":var s=document.documentElement.scrollTop||document.body.scrollTop;var a=s+document.documentElement.clientHeight;for(var l=0;ls){break}}break;case"down":o=i[i.indexOf(n)+1]||n;break;case"up":o=i[i.indexOf(n)-1]||n;break;case"bottom":o=i[i.length-1];break;case"top":default:o=i[0]}}if(o){n.removeAttribute("data-vim-selected");o.setAttribute("data-vim-selected","true");if(!t){var d=o.querySelector("h3 a")||o.querySelector("a");if(d!==null){d.focus()}}if(!e){p()}}}}function s(){document.location.reload(true)}function a(e){const t=e.target.tagName.toLowerCase();if(document.activeElement&&(t==="input"||t==="select"||t==="textarea")){document.activeElement.blur()}else{searxng.closeDetail()}}function l(t){return function(){var e=document.querySelector(t);if(e){e.click()}}}function u(){return l('nav#pagination .next_page button[type="submit"]')}function c(){return l('nav#pagination .previous_page button[type="submit"]')}function p(){var e=document.querySelector(".result[data-vim-selected]");if(e===null){return}var t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,r=e.offsetTop,o=r+e.clientHeight,i=120;if(e.previousElementSibling===null&&or-i){window.scroll(window.scrollX,r-i)}else{var s=t+n;if(s a")}if(e!==null){var t=e.getAttribute("href");if(n){window.open(t)}else{window.location.href=t}}}}function y(e){var n={};for(var t in d){var r=d[t];n[r.cat]=n[r.cat]||[];n[r.cat].push(r)}var o=Object.keys(n).sort(function(e,t){return n[t].length-n[e].length});if(o.length===0){return}var i='×';i+="How to navigate SearXNG with hotkeys
";i+="";for(var s=0;s"}i+="";i+=""+a[0].cat+"";i+='';for(var c in a){i+="- "+a[c].key+" "+a[c].des+"
"}i+=" ";i+=" | ";if(!u||l){i+=""}}i+="
";e.innerHTML=i}function v(){var e=document.querySelector("#vim-hotkeys-help");if(e===undefined||e===null){e=document.createElement("div");e.id="vim-hotkeys-help";e.className="dialog-modal";y(e);var t=document.getElementsByTagName("body")[0];t.appendChild(e)}else{e.classList.toggle("invisible");return}}searxng.scrollPageToSelected=p;searxng.selectNext=i("down");searxng.selectPrevious=i("up")});(function(e,t,n){"use strict";n.ready(function(){n.on(".searxng_init_map","click",function(e){this.classList.remove("searxng_init_map");var d=this.dataset.leafletTarget;var f=parseFloat(this.dataset.mapLon);var p=parseFloat(this.dataset.mapLat);var h=parseFloat(this.dataset.mapZoom);var m=JSON.parse(this.dataset.mapBoundingbox);var g=JSON.parse(this.dataset.mapGeojson);n.loadStyle("css/leaflet.css");n.loadScript("js/leaflet.js",function(){var e=null;if(m){var t=L.latLng(m[0],m[2]);var n=L.latLng(m[1],m[3]);e=L.latLngBounds(t,n)}var r=L.map(d);var o="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";var i='Map data © OpenStreetMap contributors';var s=new L.TileLayer(o,{minZoom:1,maxZoom:19,attribution:i});var a="https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png";var l='Wikimedia maps | Maps data © OpenStreetMap contributors';var u=new L.TileLayer(a,{minZoom:1,maxZoom:19,attribution:l});if(e){setTimeout(function(){r.fitBounds(e,{maxZoom:17})},0)}else if(f&&p){if(h){r.setView(new L.latLng(p,f),h)}else{r.setView(new L.latLng(p,f),8)}}r.addLayer(s);var c={"OSM Mapnik":s,"OSM Wikimedia":u};L.control.layers(c).addTo(r);if(g){L.geoJson(g).addTo(r)}});e.preventDefault()})})})(window,document,window.searxng);(function(e,i,s){"use strict";if(s.endpoint!=="preferences"){return}s.ready(function(){let o=null;function e(){if(o==null){s.http("GET","engine_descriptions.json").then(function(e){o=JSON.parse(e);for(const[t,n]of Object.entries(o)){let e=i.querySelectorAll('[data-engine-name="'+t+'"] .engine-description');for(const r of e){let e=" ("+s.settings.translations.Source+": "+n[1]+")";r.innerHTML=n[0]+e}}})}}for(const t of i.querySelectorAll("[data-engine-name]")){s.on(t,"mouseenter",e)}})})(window,document,window.searxng);(function(e,a,l){"use strict";if(l.endpoint!=="results"){return}l.ready(function(){a.querySelectorAll("#urls img.image").forEach(e=>e.addEventListener("error",()=>{e.style.display="none";e.error=null}));a.querySelector("#search_url button#copy_url").style.display="block";l.on(".btn-collapse","click",function(){var e=this.getAttribute("data-btn-text-collapsed");var t=this.getAttribute("data-btn-text-not-collapsed");var n=this.getAttribute("data-target");var r=a.querySelector(n);var o=this.innerHTML;if(this.classList.contains("collapsed")){o=o.replace(e,t)}else{o=o.replace(t,e)}this.innerHTML=o;this.classList.toggle("collapsed");r.classList.toggle("invisible")});l.on(".media-loader","click",function(){var e=this.getAttribute("data-target");var t=a.querySelector(e+" > iframe");var n=t.getAttribute("src");if(n===null||n===undefined||n===false){t.setAttribute("src",t.getAttribute("data-src"))}});l.on("#copy_url","click",function(){var e=this.parentElement.querySelector("pre");navigator.clipboard.writeText(e.innerText);this.innerText=this.dataset.copiedText});l.selectImage=function(e){if(e){const t=e.querySelector(".result-images-source img");const n=e.querySelector(".image_thumbnail");const r=e.querySelector(".detail");if(t){const o=t.getAttribute("data-src");if(o){const i=a.createElement("div");const s=new Image;i.classList.add("loader");r.appendChild(i);s.onload=e=>{t.src=o;i.remove()};s.onerror=e=>{i.remove()};s.src=o;t.src=n.src;t.removeAttribute("data-src")}}}a.getElementById("results").classList.add("image-detail-open");l.scrollPageToSelected()};l.closeDetail=function(e){a.getElementById("results").classList.remove("image-detail-open");l.scrollPageToSelected()};l.on(".result-detail-close","click",e=>{e.preventDefault();l.closeDetail()});l.on(".result-detail-previous","click",e=>l.selectPrevious(false));l.on(".result-detail-next","click",e=>l.selectNext(false));e.addEventListener("scroll",function(){var e=a.getElementById("backToTop"),t=document.documentElement.scrollTop||document.body.scrollTop,n=a.getElementById("results");if(e!==null){if(t>=100){n.classList.add("scrolling")}else{n.classList.remove("scrolling")}}},true)})})(window,document,window.searxng);(function(e,t,n){"use strict";var r="q",o;const i=window.matchMedia("only screen and (max-width: 50em)").matches;function s(){if(o.value.length>0){var e=document.getElementById("search");setTimeout(e.submit.bind(e),0)}}function a(t){var e=document.getElementById("clear_search");var n=function(){if(t.value.length===0){e.classList.add("empty")}else{e.classList.remove("empty")}};n();e.addEventListener("click",function(e){t.value="";t.focus();n();e.preventDefault()});t.addEventListener("keyup",n,false)}n.ready(function(){o=t.getElementById(r);if(o!==null){a(o);if(n.settings.autocomplete_provider){n.autocomplete=AutoComplete.call(e,{Url:"./autocompleter",EmptyMessage:n.settings.translations.no_item_found,HttpMethod:n.settings.http_method,HttpHeaders:{"Content-type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},MinChars:n.settings.autocomplete_min,Delay:300,_Position:function(){},_Open:function(){var t=this;Array.prototype.forEach.call(this.DOMResults.getElementsByTagName("li"),function(e){if(e.getAttribute("class")!="locked"){e.onmousedown=function(){t._Select(e)}}})},_Select:function(e){AutoComplete.defaults._Select.call(this,e);var t=e.closest("form");if(t){t.submit()}},_MinChars:function(){if(this.Input.value.indexOf("!")>-1){return 0}else{return AutoComplete.defaults._MinChars.call(this)}},KeyboardMappings:Object.assign({},AutoComplete.defaults.KeyboardMappings,{KeyUpAndDown_up:Object.assign({},AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up,{Callback:function(e){AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up.Callback.call(this,e);var t=this.DOMResults.querySelector("li.active");if(t){AutoComplete.defaults._Select.call(this,t)}}}),Tab:Object.assign({},AutoComplete.defaults.KeyboardMappings.Enter,{Conditions:[{Is:9,Not:false}],Callback:function(e){if(this.DOMResults.getAttribute("class").indexOf("open")!=-1){var t=this.DOMResults.querySelector("li.active");if(t!==null){AutoComplete.defaults._Select.call(this,t);e.preventDefault()}}}})})},"#"+r)}AutoComplete.prototype.ajax=function(e,t,n){if(n===void 0){n=true}if(e.$AjaxTimer){window.clearTimeout(e.$AjaxTimer)}if(n===true){e.$AjaxTimer=window.setTimeout(AutoComplete.prototype.ajax.bind(null,e,t,false),e.Delay)}else{if(e.Request){e.Request.abort()}e.Request=t;e.Request.send(encodeURIComponent(e._QueryArg())+"="+encodeURIComponent(e._Pre()))}};if(!i&&document.querySelector(".index_endpoint")){o.focus()}}if(o!==null&&n.settings.search_on_category_select&&t.querySelector(".search_filters")!=null){n.on(t.getElementById("safesearch"),"change",s);n.on(t.getElementById("time_range"),"change",s);n.on(t.getElementById("language"),"change",s)}try{t.querySelector("html:has(body)")}catch(e){for(let e of t.querySelectorAll("button.category_button")){n.on(e,"click",()=>{const e=t.querySelector("button.category_button.selected");console.log(e);e.classList.remove("selected")})}}})})(window,document,window.searxng);(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.AutoComplete=e()}})(function(){var e,t,n;return function(){function c(i,s,a){function l(n,e){if(!s[n]){if(!i[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var o=s[n]={exports:{}};i[n][0].call(o.exports,function(e){var t=i[n][1][e];return l(t||e)},o,o.exports,c,i,s,a)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e element.appendChild(child));\n }\n\n function loadNextPage (callback) {\n var form = d.querySelector('#pagination form.next_page');\n if (!form) {\n return\n }\n replaceChildrenWith(d.querySelector('#pagination'), [ newLoadSpinner() ]);\n var formData = new FormData(form);\n searxng.http('POST', d.querySelector('#search').getAttribute('action'), formData).then(\n function (response) {\n var nextPageDoc = new DOMParser().parseFromString(response, 'text/html');\n var articleList = nextPageDoc.querySelectorAll('#urls article');\n var paginationElement = nextPageDoc.querySelector('#pagination');\n d.querySelector('#pagination').remove();\n if (articleList.length > 0 && !onlyImages) {\n // do not add
element when there are only images\n d.querySelector('#urls').appendChild(d.createElement('hr'));\n }\n articleList.forEach(articleElement => {\n d.querySelector('#urls').appendChild(articleElement);\n });\n if (paginationElement) {\n d.querySelector('#results').appendChild(paginationElement);\n callback();\n }\n }\n ).catch(\n function (err) {\n console.log(err);\n var e = d.createElement('div');\n e.textContent = searxng.settings.translations.error_loading_next_page;\n e.classList.add('dialog-error');\n e.setAttribute('role', 'alert');\n replaceChildrenWith(d.querySelector('#pagination'), [ e ]);\n }\n )\n }\n\n if (searxng.settings.infinite_scroll && searxng.infinite_scroll_supported) {\n const intersectionObserveOptions = {\n rootMargin: \"20rem\",\n };\n const observedSelector = 'article.result:last-child';\n const observer = new IntersectionObserver(entries => {\n const paginationEntry = entries[0];\n if (paginationEntry.isIntersecting) {\n observer.unobserve(paginationEntry.target);\n loadNextPage(() => observer.observe(d.querySelector(observedSelector), intersectionObserveOptions));\n }\n });\n observer.observe(d.querySelector(observedSelector), intersectionObserveOptions);\n }\n\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global searxng */\n\nsearxng.ready(function () {\n\n function isElementInDetail (el) {\n while (el !== undefined) {\n if (el.classList.contains('detail')) {\n return true;\n }\n if (el.classList.contains('result')) {\n // we found a result, no need to go to the root of the document:\n // el is not inside a element\n return false;\n }\n el = el.parentNode;\n }\n return false;\n }\n\n function getResultElement (el) {\n while (el !== undefined) {\n if (el.classList.contains('result')) {\n return el;\n }\n el = el.parentNode;\n }\n return undefined;\n }\n\n function isImageResult (resultElement) {\n return resultElement && resultElement.classList.contains('result-images');\n }\n\n searxng.on('.result', 'click', function (e) {\n if (!isElementInDetail(e.target)) {\n highlightResult(this)(true, true);\n let resultElement = getResultElement(e.target);\n if (isImageResult(resultElement)) {\n e.preventDefault();\n searxng.selectImage(resultElement);\n }\n }\n });\n\n searxng.on('.result a', 'focus', function (e) {\n if (!isElementInDetail(e.target)) {\n let resultElement = getResultElement(e.target);\n if (resultElement && resultElement.getAttribute(\"data-vim-selected\") === null) {\n highlightResult(resultElement)(true);\n }\n if (isImageResult(resultElement)) {\n searxng.selectImage(resultElement);\n }\n }\n }, true);\n\n /* common base for layouts */\n var baseKeyBinding = {\n 'Escape': {\n key: 'ESC',\n fun: removeFocus,\n des: 'remove focus from the focused input',\n cat: 'Control'\n },\n 'h': {\n key: 'h',\n fun: toggleHelp,\n des: 'toggle help window',\n cat: 'Other'\n },\n 'i': {\n key: 'i',\n fun: searchInputFocus,\n des: 'focus on the search input',\n cat: 'Control'\n },\n 'n': {\n key: 'n',\n fun: GoToNextPage(),\n des: 'go to next page',\n cat: 'Results'\n },\n 'o': {\n key: 'o',\n fun: openResult(false),\n des: 'open search result',\n cat: 'Results'\n },\n 'p': {\n key: 'p',\n fun: GoToPreviousPage(),\n des: 'go to previous page',\n cat: 'Results'\n },\n 'r': {\n key: 'r',\n fun: reloadPage,\n des: 'reload page from the server',\n cat: 'Control'\n },\n 't': {\n key: 't',\n fun: openResult(true),\n des: 'open the result in a new tab',\n cat: 'Results'\n },\n };\n var keyBindingLayouts = {\n\n \"default\": Object.assign(\n { /* SearXNG layout */\n 'ArrowLeft': {\n key: '←',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 'ArrowRight': {\n key: '→',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n }, baseKeyBinding),\n\n 'vim': Object.assign(\n { /* Vim-like Key Layout. */\n 'b': {\n key: 'b',\n fun: scrollPage(-window.innerHeight),\n des: 'scroll one page up',\n cat: 'Navigation'\n },\n 'f': {\n key: 'f',\n fun: scrollPage(window.innerHeight),\n des: 'scroll one page down',\n cat: 'Navigation'\n },\n 'u': {\n key: 'u',\n fun: scrollPage(-window.innerHeight / 2),\n des: 'scroll half a page up',\n cat: 'Navigation'\n },\n 'd': {\n key: 'd',\n fun: scrollPage(window.innerHeight / 2),\n des: 'scroll half a page down',\n cat: 'Navigation'\n },\n 'g': {\n key: 'g',\n fun: scrollPageTo(-document.body.scrollHeight, 'top'),\n des: 'scroll to the top of the page',\n cat: 'Navigation'\n },\n 'v': {\n key: 'v',\n fun: scrollPageTo(document.body.scrollHeight, 'bottom'),\n des: 'scroll to the bottom of the page',\n cat: 'Navigation'\n },\n 'k': {\n key: 'k',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 'j': {\n key: 'j',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n }, baseKeyBinding)\n }\n\n var keyBindings = keyBindingLayouts[searxng.settings.hotkeys] || keyBindingLayouts.default;\n\n searxng.on(document, \"keydown\", function (e) {\n // check for modifiers so we don't break browser's hotkeys\n if (\n Object.prototype.hasOwnProperty.call(keyBindings, e.key)\n && !e.ctrlKey && !e.altKey\n && !e.shiftKey && !e.metaKey\n ) {\n var tagName = e.target.tagName.toLowerCase();\n if (e.key === 'Escape') {\n keyBindings[e.key].fun(e);\n } else {\n if (e.target === document.body || tagName === 'a' || tagName === 'button') {\n e.preventDefault();\n keyBindings[e.key].fun();\n }\n }\n }\n });\n\n function highlightResult (which) {\n return function (noScroll, keepFocus) {\n var current = document.querySelector('.result[data-vim-selected]'),\n effectiveWhich = which;\n if (current === null) {\n // no selection : choose the first one\n current = document.querySelector('.result');\n if (current === null) {\n // no first one : there are no results\n return;\n }\n // replace up/down actions by selecting first one\n if (which === \"down\" || which === \"up\") {\n effectiveWhich = current;\n }\n }\n\n var next, results = document.querySelectorAll('.result');\n results = Array.from(results); // convert NodeList to Array for further use\n\n if (typeof effectiveWhich !== 'string') {\n next = effectiveWhich;\n } else {\n switch (effectiveWhich) {\n case 'visible':\n var top = document.documentElement.scrollTop || document.body.scrollTop;\n var bot = top + document.documentElement.clientHeight;\n\n for (var i = 0; i < results.length; i++) {\n next = results[i];\n var etop = next.offsetTop;\n var ebot = etop + next.clientHeight;\n\n if ((ebot <= bot) && (etop > top)) {\n break;\n }\n }\n break;\n case 'down':\n next = results[results.indexOf(current) + 1] || current;\n break;\n case 'up':\n next = results[results.indexOf(current) - 1] || current;\n break;\n case 'bottom':\n next = results[results.length - 1];\n break;\n case 'top':\n /* falls through */\n default:\n next = results[0];\n }\n }\n\n if (next) {\n current.removeAttribute('data-vim-selected');\n next.setAttribute('data-vim-selected', 'true');\n if (!keepFocus) {\n var link = next.querySelector('h3 a') || next.querySelector('a');\n if (link !== null) {\n link.focus();\n }\n }\n if (!noScroll) {\n scrollPageToSelected();\n }\n }\n };\n }\n\n function reloadPage () {\n document.location.reload(true);\n }\n\n function removeFocus (e) {\n const tagName = e.target.tagName.toLowerCase();\n if (document.activeElement && (tagName === 'input' || tagName === 'select' || tagName === 'textarea')) {\n document.activeElement.blur();\n } else {\n searxng.closeDetail();\n }\n }\n\n function pageButtonClick (css_selector) {\n return function () {\n var button = document.querySelector(css_selector);\n if (button) {\n button.click();\n }\n };\n }\n\n function GoToNextPage () {\n return pageButtonClick('nav#pagination .next_page button[type=\"submit\"]');\n }\n\n function GoToPreviousPage () {\n return pageButtonClick('nav#pagination .previous_page button[type=\"submit\"]');\n }\n\n function scrollPageToSelected () {\n var sel = document.querySelector('.result[data-vim-selected]');\n if (sel === null) {\n return;\n }\n var wtop = document.documentElement.scrollTop || document.body.scrollTop,\n wheight = document.documentElement.clientHeight,\n etop = sel.offsetTop,\n ebot = etop + sel.clientHeight,\n offset = 120;\n // first element ?\n if ((sel.previousElementSibling === null) && (ebot < wheight)) {\n // set to the top of page if the first element\n // is fully included in the viewport\n window.scroll(window.scrollX, 0);\n return;\n }\n if (wtop > (etop - offset)) {\n window.scroll(window.scrollX, etop - offset);\n } else {\n var wbot = wtop + wheight;\n if (wbot < (ebot + offset)) {\n window.scroll(window.scrollX, ebot - wheight + offset);\n }\n }\n }\n\n function scrollPage (amount) {\n return function () {\n window.scrollBy(0, amount);\n highlightResult('visible')();\n };\n }\n\n function scrollPageTo (position, nav) {\n return function () {\n window.scrollTo(0, position);\n highlightResult(nav)();\n };\n }\n\n function searchInputFocus () {\n window.scrollTo(0, 0);\n var q = document.querySelector('#q');\n q.focus();\n if (q.setSelectionRange) {\n var len = q.value.length;\n q.setSelectionRange(len, len);\n }\n }\n\n function openResult (newTab) {\n return function () {\n var link = document.querySelector('.result[data-vim-selected] h3 a');\n if (link === null) {\n link = document.querySelector('.result[data-vim-selected] > a');\n }\n if (link !== null) {\n var url = link.getAttribute('href');\n if (newTab) {\n window.open(url);\n } else {\n window.location.href = url;\n }\n }\n };\n }\n\n function initHelpContent (divElement) {\n var categories = {};\n\n for (var k in keyBindings) {\n var key = keyBindings[k];\n categories[key.cat] = categories[key.cat] || [];\n categories[key.cat].push(key);\n }\n\n var sorted = Object.keys(categories).sort(function (a, b) {\n return categories[b].length - categories[a].length;\n });\n\n if (sorted.length === 0) {\n return;\n }\n\n var html = '
×';\n html += '
How to navigate SearXNG with hotkeys
';\n html += '
';\n\n for (var i = 0; i < sorted.length; i++) {\n var cat = categories[sorted[i]];\n\n var lastCategory = i === (sorted.length - 1);\n var first = i % 2 === 0;\n\n if (first) {\n html += '';\n }\n html += '';\n\n html += '' + cat[0].cat + '';\n html += '';\n\n for (var cj in cat) {\n html += '- ' + cat[cj].key + ' ' + cat[cj].des + '
';\n }\n\n html += ' ';\n html += ' | '; // col-sm-*\n\n if (!first || lastCategory) {\n html += '
'; // row\n }\n }\n\n html += '
';\n\n divElement.innerHTML = html;\n }\n\n function toggleHelp () {\n var helpPanel = document.querySelector('#vim-hotkeys-help');\n if (helpPanel === undefined || helpPanel === null) {\n // first call\n helpPanel = document.createElement('div');\n helpPanel.id = 'vim-hotkeys-help';\n helpPanel.className = 'dialog-modal';\n initHelpContent(helpPanel);\n var body = document.getElementsByTagName('body')[0];\n body.appendChild(helpPanel);\n } else {\n // togggle hidden\n helpPanel.classList.toggle('invisible');\n return;\n }\n }\n\n searxng.scrollPageToSelected = scrollPageToSelected;\n searxng.selectNext = highlightResult('down');\n searxng.selectPrevious = highlightResult('up');\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global L */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.on('.searxng_init_map', 'click', function (event) {\n // no more request\n this.classList.remove(\"searxng_init_map\");\n\n //\n var leaflet_target = this.dataset.leafletTarget;\n var map_lon = parseFloat(this.dataset.mapLon);\n var map_lat = parseFloat(this.dataset.mapLat);\n var map_zoom = parseFloat(this.dataset.mapZoom);\n var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);\n var map_geojson = JSON.parse(this.dataset.mapGeojson);\n\n searxng.loadStyle('css/leaflet.css');\n searxng.loadScript('js/leaflet.js', function () {\n var map_bounds = null;\n if (map_boundingbox) {\n var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);\n var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);\n map_bounds = L.latLngBounds(southWest, northEast);\n }\n\n // init map\n var map = L.map(leaflet_target);\n // create the tile layer with correct attribution\n var osmMapnikUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n var osmMapnikAttrib = 'Map data ©
OpenStreetMap contributors';\n var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});\n var osmWikimediaUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';\n var osmWikimediaAttrib = 'Wikimedia maps | Maps data ©
OpenStreetMap contributors';\n var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});\n // init map view\n if (map_bounds) {\n // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021\n // Still useful ?\n setTimeout(function () {\n map.fitBounds(map_bounds, {\n maxZoom: 17\n });\n }, 0);\n } else if (map_lon && map_lat) {\n if (map_zoom) {\n map.setView(new L.latLng(map_lat, map_lon), map_zoom);\n } else {\n map.setView(new L.latLng(map_lat, map_lon), 8);\n }\n }\n\n map.addLayer(osmMapnik);\n\n var baseLayers = {\n \"OSM Mapnik\": osmMapnik,\n \"OSM Wikimedia\": osmWikimedia,\n };\n\n L.control.layers(baseLayers).addTo(map);\n\n if (map_geojson) {\n L.geoJson(map_geojson).addTo(map);\n } /* else if(map_bounds) {\n L.rectangle(map_bounds, {color: \"#ff7800\", weight: 3, fill:false}).addTo(map);\n } */\n });\n\n // this event occour only once per element\n event.preventDefault();\n });\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'preferences') {\n return;\n }\n\n searxng.ready(function () {\n let engine_descriptions = null;\n function load_engine_descriptions () {\n if (engine_descriptions == null) {\n searxng.http(\"GET\", \"engine_descriptions.json\").then(function (content) {\n engine_descriptions = JSON.parse(content);\n for (const [engine_name, description] of Object.entries(engine_descriptions)) {\n let elements = d.querySelectorAll('[data-engine-name=\"' + engine_name + '\"] .engine-description');\n for (const element of elements) {\n let source = ' (
' + searxng.settings.translations.Source + ': ' + description[1] + ')';\n element.innerHTML = description[0] + source;\n }\n }\n });\n }\n }\n\n for (const el of d.querySelectorAll('[data-engine-name]')) {\n searxng.on(el, 'mouseenter', load_engine_descriptions);\n }\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'results') {\n return;\n }\n\n searxng.ready(function () {\n d.querySelectorAll('#urls img.image').forEach(\n img =>\n img.addEventListener(\n 'error', () => {\n img.style.display = 'none';\n img.error = null;\n }\n ));\n\n searxng.on('.btn-collapse', 'click', function () {\n var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');\n var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');\n var target = this.getAttribute('data-target');\n var targetElement = d.querySelector(target);\n var html = this.innerHTML;\n if (this.classList.contains('collapsed')) {\n html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);\n } else {\n html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);\n }\n this.innerHTML = html;\n this.classList.toggle('collapsed');\n targetElement.classList.toggle('invisible');\n });\n\n searxng.on('.media-loader', 'click', function () {\n var target = this.getAttribute('data-target');\n var iframe_load = d.querySelector(target + ' > iframe');\n var srctest = iframe_load.getAttribute('src');\n if (srctest === null || srctest === undefined || srctest === false) {\n iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));\n }\n });\n\n searxng.selectImage = function (resultElement) {\n /* eslint no-unused-vars: 0 */\n if (resultElement) {\n // load full size image in background\n const imgElement = resultElement.querySelector('.result-images-source img');\n const thumbnailElement = resultElement.querySelector('.image_thumbnail');\n const detailElement = resultElement.querySelector('.detail');\n if (imgElement) {\n const imgSrc = imgElement.getAttribute('data-src');\n if (imgSrc) {\n const loader = d.createElement('div');\n const imgLoader = new Image();\n\n loader.classList.add('loader');\n detailElement.appendChild(loader);\n\n imgLoader.onload = e => {\n imgElement.src = imgSrc;\n loader.remove();\n };\n imgLoader.onerror = e => {\n loader.remove();\n };\n imgLoader.src = imgSrc;\n imgElement.src = thumbnailElement.src;\n imgElement.removeAttribute('data-src');\n }\n }\n }\n d.getElementById('results').classList.add('image-detail-open');\n searxng.scrollPageToSelected();\n }\n\n searxng.closeDetail = function (e) {\n d.getElementById('results').classList.remove('image-detail-open');\n searxng.scrollPageToSelected();\n }\n searxng.on('.result-detail-close', 'click', e => {\n e.preventDefault();\n searxng.closeDetail();\n });\n searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false));\n searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false));\n\n w.addEventListener('scroll', function () {\n var e = d.getElementById('backToTop'),\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n results = d.getElementById('results');\n if (e !== null) {\n if (scrollTop >= 100) {\n results.classList.add('scrolling');\n } else {\n results.classList.remove('scrolling');\n }\n }\n }, true);\n\n });\n\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global AutoComplete */\n(function (w, d, searxng) {\n 'use strict';\n\n var qinput_id = \"q\", qinput;\n\n const isMobile = window.matchMedia(\"only screen and (max-width: 50em)\").matches;\n\n function submitIfQuery () {\n if (qinput.value.length > 0) {\n var search = document.getElementById('search');\n setTimeout(search.submit.bind(search), 0);\n }\n }\n\n function createClearButton (qinput) {\n var cs = document.getElementById('clear_search');\n var updateClearButton = function () {\n if (qinput.value.length === 0) {\n cs.classList.add(\"empty\");\n } else {\n cs.classList.remove(\"empty\");\n }\n };\n\n // update status, event listener\n updateClearButton();\n cs.addEventListener('click', function (ev) {\n qinput.value = '';\n qinput.focus();\n updateClearButton();\n ev.preventDefault();\n });\n qinput.addEventListener('keyup', updateClearButton, false);\n }\n\n searxng.ready(function () {\n qinput = d.getElementById(qinput_id);\n\n if (qinput !== null) {\n // clear button\n createClearButton(qinput);\n\n // autocompleter\n if (searxng.settings.autocomplete_provider) {\n searxng.autocomplete = AutoComplete.call(w, {\n Url: \"./autocompleter\",\n EmptyMessage: searxng.settings.translations.no_item_found,\n HttpMethod: searxng.settings.http_method,\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n MinChars: searxng.settings.autocomplete_min,\n Delay: 300,\n _Position: function () {},\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onmousedown = function () {\n params._Select(li);\n };\n }\n });\n },\n _Select: function (item) {\n AutoComplete.defaults._Select.call(this, item);\n var form = item.closest('form');\n if (form) {\n form.submit();\n }\n },\n _MinChars: function () {\n if (this.Input.value.indexOf('!') > -1) {\n return 0;\n } else {\n return AutoComplete.defaults._MinChars.call(this);\n }\n },\n KeyboardMappings: Object.assign({}, AutoComplete.defaults.KeyboardMappings, {\n \"KeyUpAndDown_up\": Object.assign({}, AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up, {\n Callback: function (event) {\n AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up.Callback.call(this, event);\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive) {\n AutoComplete.defaults._Select.call(this, liActive);\n }\n },\n }),\n \"Tab\": Object.assign({}, AutoComplete.defaults.KeyboardMappings.Enter, {\n Conditions: [{\n Is: 9,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n AutoComplete.defaults._Select.call(this, liActive);\n event.preventDefault();\n }\n }\n },\n })\n }),\n }, \"#\" + qinput_id);\n }\n\n /*\n Monkey patch autocomplete.js to fix a bug\n With the POST method, the values are not URL encoded: query like \"1 + 1\" are sent as \"1 1\" since space are URL encoded as plus.\n See HTML specifications:\n * HTML5: https://url.spec.whatwg.org/#concept-urlencoded-serializer\n * HTML4: https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1\n\n autocomplete.js does not URL encode the name and values:\n https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/src/autocomplete.ts#L665\n\n The monkey patch overrides the compiled version of the ajax function.\n See https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/dist/autocomplete.js#L143-L158\n The patch changes only the line 156 from\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n to\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n\n Related to:\n * https://github.com/autocompletejs/autocomplete.js/issues/78\n * https://github.com/searxng/searxng/issues/1695\n */\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n } else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n }\n };\n\n if (!isMobile && document.querySelector('.index_endpoint')) {\n qinput.focus();\n }\n }\n\n // Additionally to searching when selecting a new category, we also\n // automatically start a new search request when the user changes a search\n // filter (safesearch, time range or language) (this requires JavaScript\n // though)\n if (\n qinput !== null\n && searxng.settings.search_on_category_select\n // If .search_filters is undefined (invisible) we are on the homepage and\n // hence don't have to set any listeners\n && d.querySelector(\".search_filters\") != null\n ) {\n searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);\n searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);\n searxng.on(d.getElementById('language'), 'change', submitIfQuery);\n }\n\n // most common browsers at the time of writing this support :has, except for Firefox\n // can be removed when Firefox / Firefox ESL starts supporting it as well\n try {\n // this fails when the browser does not support :has\n d.querySelector(\"html:has(body)\");\n } catch (_) {\n // manually deselect the old selection when a new category is selected\n for (let button of d.querySelectorAll(\"button.category_button\")) {\n searxng.on(button, 'click', () => {\n const selected = d.querySelector(\"button.category_button.selected\");\n console.log(selected);\n selected.classList.remove(\"selected\");\n })\n }\n }\n });\n\n})(window, document, window.searxng);\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i
@baptistedonaux\n */\nvar AutoComplete = /** @class */ (function () {\n // Constructor\n function AutoComplete(params, selector) {\n if (params === void 0) { params = {}; }\n if (selector === void 0) { selector = \"[data-autocomplete]\"; }\n if (Array.isArray(selector)) {\n selector.forEach(function (s) {\n new AutoComplete(params, s);\n });\n }\n else if (typeof selector == \"string\") {\n var elements = document.querySelectorAll(selector);\n Array.prototype.forEach.call(elements, function (input) {\n new AutoComplete(params, input);\n });\n }\n else {\n var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {\n DOMResults: document.createElement(\"div\")\n });\n AutoComplete.prototype.create(specificParams, selector);\n return specificParams;\n }\n }\n AutoComplete.prototype.create = function (params, element) {\n params.Input = element;\n if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute(\"type\") === false || params.Input.getAttribute(\"type\").match(/^TEXT|SEARCH$/i))) {\n params.Input.setAttribute(\"autocomplete\", \"off\");\n params._Position(params);\n params.Input.parentNode.appendChild(params.DOMResults);\n params.$Listeners = {\n blur: params._Blur.bind(params),\n destroy: AutoComplete.prototype.destroy.bind(null, params),\n focus: params._Focus.bind(params),\n keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),\n keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),\n position: params._Position.bind(params)\n };\n for (var event in params.$Listeners) {\n params.Input.addEventListener(event, params.$Listeners[event]);\n }\n }\n };\n AutoComplete.prototype.getEventsByType = function (params, type) {\n var mappings = {};\n for (var key in params.KeyboardMappings) {\n var event = EventType.KEYUP;\n if (params.KeyboardMappings[key].Event !== undefined) {\n event = params.KeyboardMappings[key].Event;\n }\n if (event == type) {\n mappings[key] = params.KeyboardMappings[key];\n }\n }\n return mappings;\n };\n AutoComplete.prototype.event = function (params, type, event) {\n var eventIdentifier = function (condition) {\n if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {\n condition = AutoComplete.merge({\n Not: false\n }, condition);\n if (condition.hasOwnProperty(\"Is\")) {\n if (condition.Is == event.keyCode) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n else if (condition.hasOwnProperty(\"From\") && condition.hasOwnProperty(\"To\")) {\n if (event.keyCode >= condition.From && event.keyCode <= condition.To) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n }\n };\n for (var name in AutoComplete.prototype.getEventsByType(params, type)) {\n var mapping = AutoComplete.merge({\n Operator: ConditionOperator.AND\n }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;\n mapping.Conditions.forEach(eventIdentifier);\n if (match === true) {\n mapping.Callback.call(params, event);\n }\n }\n };\n AutoComplete.prototype.makeRequest = function (params, callback, callbackErr) {\n var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(queryParams);\n if (method.match(/^GET$/i)) {\n if (url.indexOf(\"?\") !== -1) {\n url += \"&\" + queryParamsStringify;\n }\n else {\n url += \"?\" + queryParamsStringify;\n }\n }\n request.open(method, url, true);\n for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {\n request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);\n }\n request.onreadystatechange = function () {\n if (request.readyState == 4 && request.status == 200) {\n params.$Cache[queryParams] = request.response;\n callback(request.response);\n }\n else if (request.status >= 400) {\n callbackErr();\n }\n };\n return request;\n };\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n }\n else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n }\n };\n AutoComplete.prototype.cache = function (params, callback, callbackErr) {\n var response = params._Cache(params._Pre());\n if (response === undefined) {\n var request = AutoComplete.prototype.makeRequest(params, callback, callbackErr);\n AutoComplete.prototype.ajax(params, request);\n }\n else {\n callback(response);\n }\n };\n AutoComplete.prototype.destroy = function (params) {\n for (var event in params.$Listeners) {\n params.Input.removeEventListener(event, params.$Listeners[event]);\n }\n params.DOMResults.parentNode.removeChild(params.DOMResults);\n };\n AutoComplete.merge = function () {\n var merge = {}, tmp;\n for (var i = 0; i < arguments.length; i++) {\n for (tmp in arguments[i]) {\n merge[tmp] = arguments[i][tmp];\n }\n }\n return merge;\n };\n AutoComplete.defaults = {\n Delay: 150,\n EmptyMessage: \"No result here\",\n Highlight: {\n getRegex: function (value) {\n return new RegExp(value, \"ig\");\n },\n transform: function (value) {\n return \"\" + value + \"\";\n }\n },\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\"\n },\n Limit: 0,\n MinChars: 0,\n HttpMethod: \"GET\",\n QueryArg: \"q\",\n Url: null,\n KeyboardMappings: {\n \"Enter\": {\n Conditions: [{\n Is: 13,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n event.preventDefault();\n this._Select(liActive);\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n }\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_down\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_up\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n var first = this.DOMResults.querySelector(\"li:first-child:not(.locked)\"), last = this.DOMResults.querySelector(\"li:last-child:not(.locked)\"), active = this.DOMResults.querySelector(\"li.active\");\n if (active) {\n var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName(\"li\").length;\n if (position < 0) {\n position = lisCount - 1;\n }\n else if (position >= lisCount) {\n position = 0;\n }\n active.classList.remove(\"active\");\n active.parentElement.children.item(position).classList.add(\"active\");\n }\n else if (last && event.keyCode == 38) {\n last.classList.add(\"active\");\n }\n else if (first) {\n first.classList.add(\"active\");\n }\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYUP\n },\n \"AlphaNum\": {\n Conditions: [{\n Is: 13,\n Not: true\n }, {\n From: 35,\n To: 40,\n Not: true\n }],\n Callback: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\"), currentValue = this._Pre();\n if (currentValue !== \"\" && currentValue.length >= this._MinChars()) {\n if (!oldValue || currentValue != oldValue) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n AutoComplete.prototype.cache(this, function (response) {\n this._Render(this._Post(response));\n this._Open();\n }.bind(this), this._Error);\n }\n else {\n this._Close();\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYUP\n }\n },\n DOMResults: null,\n Request: null,\n Input: null,\n /**\n * Return the message when no result returns\n */\n _EmptyMessage: function () {\n var emptyMessage = \"\";\n if (this.Input.hasAttribute(\"data-autocomplete-empty-message\")) {\n emptyMessage = this.Input.getAttribute(\"data-autocomplete-empty-message\");\n }\n else if (this.EmptyMessage !== false) {\n emptyMessage = this.EmptyMessage;\n }\n else {\n emptyMessage = \"\";\n }\n return emptyMessage;\n },\n /**\n * Returns the maximum number of results\n */\n _Limit: function () {\n var limit = this.Input.getAttribute(\"data-autocomplete-limit\");\n if (isNaN(limit) || limit === null) {\n return this.Limit;\n }\n return parseInt(limit, 10);\n },\n /**\n * Returns the minimum number of characters entered before firing ajax\n */\n _MinChars: function () {\n var minchars = this.Input.getAttribute(\"data-autocomplete-minchars\");\n if (isNaN(minchars) || minchars === null) {\n return this.MinChars;\n }\n return parseInt(minchars, 10);\n },\n /**\n * Apply transformation on labels response\n */\n _Highlight: function (label) {\n return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);\n },\n /**\n * Returns the HHTP method to use\n */\n _HttpMethod: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-method\")) {\n return this.Input.getAttribute(\"data-autocomplete-method\");\n }\n return this.HttpMethod;\n },\n /**\n * Returns the query param to use\n */\n _QueryArg: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-param-name\")) {\n return this.Input.getAttribute(\"data-autocomplete-param-name\");\n }\n return this.QueryArg;\n },\n /**\n * Returns the URL to use for AJAX request\n */\n _Url: function () {\n if (this.Input.hasAttribute(\"data-autocomplete\")) {\n return this.Input.getAttribute(\"data-autocomplete\");\n }\n return this.Url;\n },\n /**\n * Manage the close\n */\n _Blur: function (now) {\n if (now === void 0) { now = false; }\n if (now) {\n this._Close();\n }\n else {\n var params = this;\n setTimeout(function () {\n params._Blur(true);\n }, 150);\n }\n },\n /**\n * Manage the cache\n */\n _Cache: function (value) {\n return this.$Cache[value];\n },\n /**\n * Manage the open\n */\n _Focus: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\");\n if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n },\n /**\n * Bind all results item if one result is opened\n */\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onclick = function () {\n params._Select(li);\n };\n }\n });\n },\n _Close: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n },\n /**\n * Position the results HTML element\n */\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.setAttribute(\"style\", \"top:\" + (this.Input.offsetTop + this.Input.offsetHeight) + \"px;left:\" + this.Input.offsetLeft + \"px;width:\" + this.Input.clientWidth + \"px;\");\n },\n /**\n * Execute the render of results DOM element\n */\n _Render: function (response) {\n var ul;\n if (typeof response == \"string\") {\n ul = this._RenderRaw(response);\n }\n else {\n ul = this._RenderResponseItems(response);\n }\n if (this.DOMResults.hasChildNodes()) {\n this.DOMResults.removeChild(this.DOMResults.childNodes[0]);\n }\n this.DOMResults.appendChild(ul);\n },\n /**\n * ResponseItems[] rendering\n */\n _RenderResponseItems: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\"), limit = this._Limit();\n // Order\n if (limit < 0) {\n response = response.reverse();\n }\n else if (limit === 0) {\n limit = response.length;\n }\n for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {\n li.innerHTML = response[item].Label;\n li.setAttribute(\"data-autocomplete-value\", response[item].Value);\n ul.appendChild(li);\n li = document.createElement(\"li\");\n }\n return ul;\n },\n /**\n * string response rendering (RAW HTML)\n */\n _RenderRaw: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\");\n if (response.length > 0) {\n this.DOMResults.innerHTML = response;\n }\n else {\n var emptyMessage = this._EmptyMessage();\n if (emptyMessage !== \"\") {\n li.innerHTML = emptyMessage;\n li.setAttribute(\"class\", \"locked\");\n ul.appendChild(li);\n }\n }\n return ul;\n },\n /**\n * Deal with request response\n */\n _Post: function (response) {\n try {\n var returnResponse = [];\n //JSON return\n var json = JSON.parse(response);\n if (Object.keys(json).length === 0) {\n return \"\";\n }\n if (Array.isArray(json)) {\n for (var i = 0; i < Object.keys(json).length; i++) {\n returnResponse[returnResponse.length] = { \"Value\": json[i], \"Label\": this._Highlight(json[i]) };\n }\n }\n else {\n for (var value in json) {\n returnResponse.push({\n \"Value\": value,\n \"Label\": this._Highlight(json[value])\n });\n }\n }\n return returnResponse;\n }\n catch (event) {\n //HTML return\n return response;\n }\n },\n /**\n * Return the autocomplete value to send (before request)\n */\n _Pre: function () {\n return this.Input.value;\n },\n /**\n * Choice one result item\n */\n _Select: function (item) {\n if (item.hasAttribute(\"data-autocomplete-value\")) {\n this.Input.value = item.getAttribute(\"data-autocomplete-value\");\n }\n else {\n this.Input.value = item.innerHTML;\n }\n this.Input.setAttribute(\"data-autocomplete-old-value\", this.Input.value);\n },\n /**\n * Handle HTTP error on the request\n */\n _Error: function () {\n },\n $AjaxTimer: null,\n $Cache: {},\n $Listeners: {}\n };\n return AutoComplete;\n}());\nmodule.exports = AutoComplete;\n\n},{}]},{},[1])(1)\n});\n"],"names":["window","searxng","w","d","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","data","Promise","resolve","reject","req","XMLHttpRequest","open","timeout","onload","status","response","responseType","Error","statusText","onerror","onabort","ontimeout","send","ex","loadStyle","src","path","settings","theme_static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","insertAfter","nextSibling","classList","add","getEndpoint","className","getElementsByTagName","values","endsWith","split","endpoint","infinite_scroll_supported","IntersectionObserverEntry","let","onlyImages","contains","newLoadSpinner","loader","replaceChildrenWith","element","children","textContent","forEach","child","loadNextPage","form","querySelector","formData","FormData","getAttribute","then","nextPageDoc","DOMParser","parseFromString","articleList","paginationElement","remove","length","articleElement","catch","err","translations","error_loading_next_page","infinite_scroll","intersectionObserveOptions","rootMargin","observedSelector","observer","IntersectionObserver","entries","paginationEntry","isIntersecting","unobserve","observe","isElementInDetail","undefined","getResultElement","isImageResult","resultElement","highlightResult","preventDefault","selectImage","baseKeyBinding","Escape","key","fun","removeFocus","des","cat","h","toggleHelp","searchInputFocus","n","GoToNextPage","o","openResult","p","GoToPreviousPage","r","reloadPage","t","keyBindingLayouts","default","Object","assign","ArrowLeft","ArrowRight","vim","b","scrollPage","innerHeight","f","u","g","scrollPageTo","scrollHeight","v","k","j","keyBindings","hotkeys","hasOwnProperty","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","keepFocus","current","effectiveWhich","next","results","Array","from","top","documentElement","scrollTop","bot","clientHeight","etop","offsetTop","ebot","indexOf","removeAttribute","link","focus","scrollPageToSelected","location","reload","activeElement","blur","closeDetail","pageButtonClick","css_selector","button","click","sel","wtop","wheight","offset","previousElementSibling","scroll","scrollX","wbot","amount","scrollBy","position","nav","scrollTo","q","setSelectionRange","len","value","newTab","href","initHelpContent","divElement","categories","push","sorted","keys","sort","a","html","lastCategory","first","cj","innerHTML","helpPanel","toggle","selectNext","selectPrevious","event","leaflet_target","dataset","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","JSON","parse","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","setTimeout","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","OSM Wikimedia","control","layers","addTo","geoJson","engine_descriptions","load_engine_descriptions","content","engine_name","description","elements","source","Source","img","style","display","error","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","imgElement","thumbnailElement","detailElement","imgSrc","imgLoader","Image","qinput_id","qinput","isMobile","matchMedia","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","ev","autocomplete_provider","autocomplete","AutoComplete","Url","EmptyMessage","no_item_found","HttpMethod","http_method","HttpHeaders","Content-type","X-Requested-With","MinChars","autocomplete_min","Delay","_Position","_Open","params","DOMResults","li","onmousedown","_Select","item","defaults","closest","_MinChars","Input","KeyboardMappings","KeyUpAndDown_up","Callback","liActive","Tab","Enter","Conditions","Is","Not","ajax","request","$AjaxTimer","clearTimeout","Request","abort","encodeURIComponent","_QueryArg","_Pre","search_on_category_select","_","selected","exports","module","define","amd","global","self","c","require","code","1","ConditionOperator","EventType","isArray","input","specificParams","merge","create","nodeName","match","$Listeners","_Blur","destroy","_Focus","keyup","KEYUP","keydown","KEYDOWN","getEventsByType","type","mappings","Event","eventIdentifier","condition","mapping","Operator","AND","OR","keyCode","From","To","name","makeRequest","callbackErr","propertyHttpHeaders","getOwnPropertyNames","_HttpMethod","_Url","queryParams","queryParamsStringify","setRequestHeader","onreadystatechange","$Cache","cache","_Cache","removeEventListener","removeChild","tmp","arguments","Highlight","getRegex","RegExp","transform","Limit","QueryArg","KeyUpAndDown_down","last","active","currentIndex","lisCount","AlphaNum","oldValue","currentValue","_Render","_Post","_Error","_Close","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","parseInt","minchars","_Highlight","label","now","onclick","offsetHeight","offsetLeft","clientWidth","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","Math","min","abs","Label","Value","returnResponse","json"],"mappings":";;;;;GAMAA;OAAOC,QAAU,SAAWC,EAAGC,GAE7B,aAMA,GAAID,EAAEE,QAAS,EACb,SAAWC,GACTA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAAUC,GACR,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,CAAQ,EAAGO,EAAI,CAAC,EAC7F,MAAOJ,EAAM,EAAEI,IAAMJ,EAAMI,IAAMN,GACjC,MAAO,CAAC,CAACE,EAAMI,EACjB,CACD,GAAEb,QAAQc,SAAS,CACtB,CAEA,SAASC,EAAcC,EAAUC,EAAIC,GACnC,IACEF,EAASG,KAAKF,EAAIC,CAAC,CAGrB,CAFE,MAAOE,GACPC,QAAQC,IAAIF,CAAS,CACvB,C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ChB,EACA,OAAOhE,CACX,EAAG,EACH8C,EAAOD,QAAU7C,CAEjB,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAChB,CAAC"}
\ No newline at end of file
+{"version":3,"file":"searxng.min.js","sources":["../src/js/main/00_toolkit.js","../src/js/main/infinite_scroll.js","../src/js/main/keyboard.js","../src/js/main/mapresult.js","../src/js/main/preferences.js","../src/js/main/results.js","../src/js/main/search.js","../node_modules/autocomplete-js/dist/autocomplete.js"],"sourcesContent":["/**\n * @license\n * (C) Copyright Contributors to the SearXNG project.\n * (C) Copyright Contributors to the searx project (2014 - 2021).\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nwindow.searxng = (function (w, d) {\n\n 'use strict';\n\n // not invented here tookit with bugs fixed elsewhere\n // purposes : be just good enough and as small as possible\n\n // from https://plainjs.com/javascript/events/live-binding-event-handlers-14/\n if (w.Element) {\n (function (ElementPrototype) {\n ElementPrototype.matches = ElementPrototype.matches ||\n ElementPrototype.matchesSelector ||\n ElementPrototype.webkitMatchesSelector ||\n ElementPrototype.msMatchesSelector ||\n function (selector) {\n var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;\n while (nodes[++i] && nodes[i] != node);\n return !!nodes[i];\n };\n })(Element.prototype);\n }\n\n function callbackSafe (callback, el, e) {\n try {\n callback.call(el, e);\n } catch (exception) {\n console.log(exception);\n }\n }\n\n var searxng = window.searxng || {};\n\n searxng.on = function (obj, eventType, callback, useCapture) {\n useCapture = useCapture || false;\n if (typeof obj !== 'string') {\n // obj HTMLElement, HTMLDocument\n obj.addEventListener(eventType, callback, useCapture);\n } else {\n // obj is a selector\n d.addEventListener(eventType, function (e) {\n var el = e.target || e.srcElement, found = false;\n while (el && el.matches && el !== d && !(found = el.matches(obj))) el = el.parentElement;\n if (found) callbackSafe(callback, el, e);\n }, useCapture);\n }\n };\n\n searxng.ready = function (callback) {\n if (document.readyState != 'loading') {\n callback.call(w);\n } else {\n w.addEventListener('DOMContentLoaded', callback.bind(w));\n }\n };\n\n searxng.http = function (method, url, data = null) {\n return new Promise(function (resolve, reject) {\n try {\n var req = new XMLHttpRequest();\n req.open(method, url, true);\n req.timeout = 20000;\n\n // On load\n req.onload = function () {\n if (req.status == 200) {\n resolve(req.response, req.responseType);\n } else {\n reject(Error(req.statusText));\n }\n };\n\n // Handle network errors\n req.onerror = function () {\n reject(Error(\"Network Error\"));\n };\n\n req.onabort = function () {\n reject(Error(\"Transaction is aborted\"));\n };\n\n req.ontimeout = function () {\n reject(Error(\"Timeout\"));\n }\n\n // Make the request\n if (data) {\n req.send(data)\n } else {\n req.send();\n }\n } catch (ex) {\n reject(ex);\n }\n });\n };\n\n searxng.loadStyle = function (src) {\n var path = searxng.settings.theme_static_path + \"/\" + src,\n id = \"style_\" + src.replace('.', '_'),\n s = d.getElementById(id);\n if (s === null) {\n s = d.createElement('link');\n s.setAttribute('id', id);\n s.setAttribute('rel', 'stylesheet');\n s.setAttribute('type', 'text/css');\n s.setAttribute('href', path);\n d.body.appendChild(s);\n }\n };\n\n searxng.loadScript = function (src, callback) {\n var path = searxng.settings.theme_static_path + \"/\" + src,\n id = \"script_\" + src.replace('.', '_'),\n s = d.getElementById(id);\n if (s === null) {\n s = d.createElement('script');\n s.setAttribute('id', id);\n s.setAttribute('src', path);\n s.onload = callback;\n s.onerror = function () {\n s.setAttribute('error', '1');\n };\n d.body.appendChild(s);\n } else if (!s.hasAttribute('error')) {\n try {\n callback.apply(s, []);\n } catch (exception) {\n console.log(exception);\n }\n } else {\n console.log(\"callback not executed : script '\" + path + \"' not loaded.\");\n }\n };\n\n searxng.insertBefore = function (newNode, referenceNode) {\n referenceNode.parentNode.insertBefore(newNode, referenceNode);\n };\n\n searxng.insertAfter = function (newNode, referenceNode) {\n referenceNode.parentNode.insertAfter(newNode, referenceNode.nextSibling);\n };\n\n searxng.on('.close', 'click', function () {\n this.parentNode.classList.add('invisible');\n });\n\n function getEndpoint () {\n for (var className of d.getElementsByTagName('body')[0].classList.values()) {\n if (className.endsWith('_endpoint')) {\n return className.split('_')[0];\n }\n }\n return '';\n }\n\n searxng.endpoint = getEndpoint();\n\n return searxng;\n})(window, document);\n","// SPDX-License-Identifier: AGPL-3.0-or-later\n\n/* global searxng */\n\nsearxng.ready(function () {\n 'use strict';\n\n searxng.infinite_scroll_supported = (\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'intersectionRatio' in window.IntersectionObserverEntry.prototype);\n\n if (searxng.endpoint !== 'results') {\n return;\n }\n\n if (!searxng.infinite_scroll_supported) {\n console.log('IntersectionObserver not supported');\n return;\n }\n\n let d = document;\n var onlyImages = d.getElementById('results').classList.contains('only_template_images');\n\n function newLoadSpinner () {\n var loader = d.createElement('div');\n loader.classList.add('loader');\n return loader;\n }\n\n function replaceChildrenWith (element, children) {\n element.textContent = '';\n children.forEach(child => element.appendChild(child));\n }\n\n function loadNextPage (callback) {\n var form = d.querySelector('#pagination form.next_page');\n if (!form) {\n return\n }\n replaceChildrenWith(d.querySelector('#pagination'), [ newLoadSpinner() ]);\n var formData = new FormData(form);\n searxng.http('POST', d.querySelector('#search').getAttribute('action'), formData).then(\n function (response) {\n var nextPageDoc = new DOMParser().parseFromString(response, 'text/html');\n var articleList = nextPageDoc.querySelectorAll('#urls article');\n var paginationElement = nextPageDoc.querySelector('#pagination');\n d.querySelector('#pagination').remove();\n if (articleList.length > 0 && !onlyImages) {\n // do not add
element when there are only images\n d.querySelector('#urls').appendChild(d.createElement('hr'));\n }\n articleList.forEach(articleElement => {\n d.querySelector('#urls').appendChild(articleElement);\n });\n if (paginationElement) {\n d.querySelector('#results').appendChild(paginationElement);\n callback();\n }\n }\n ).catch(\n function (err) {\n console.log(err);\n var e = d.createElement('div');\n e.textContent = searxng.settings.translations.error_loading_next_page;\n e.classList.add('dialog-error');\n e.setAttribute('role', 'alert');\n replaceChildrenWith(d.querySelector('#pagination'), [ e ]);\n }\n )\n }\n\n if (searxng.settings.infinite_scroll && searxng.infinite_scroll_supported) {\n const intersectionObserveOptions = {\n rootMargin: \"20rem\",\n };\n const observedSelector = 'article.result:last-child';\n const observer = new IntersectionObserver(entries => {\n const paginationEntry = entries[0];\n if (paginationEntry.isIntersecting) {\n observer.unobserve(paginationEntry.target);\n loadNextPage(() => observer.observe(d.querySelector(observedSelector), intersectionObserveOptions));\n }\n });\n observer.observe(d.querySelector(observedSelector), intersectionObserveOptions);\n }\n\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global searxng */\n\nsearxng.ready(function () {\n\n function isElementInDetail (el) {\n while (el !== undefined) {\n if (el.classList.contains('detail')) {\n return true;\n }\n if (el.classList.contains('result')) {\n // we found a result, no need to go to the root of the document:\n // el is not inside a element\n return false;\n }\n el = el.parentNode;\n }\n return false;\n }\n\n function getResultElement (el) {\n while (el !== undefined) {\n if (el.classList.contains('result')) {\n return el;\n }\n el = el.parentNode;\n }\n return undefined;\n }\n\n function isImageResult (resultElement) {\n return resultElement && resultElement.classList.contains('result-images');\n }\n\n searxng.on('.result', 'click', function (e) {\n if (!isElementInDetail(e.target)) {\n highlightResult(this)(true, true);\n let resultElement = getResultElement(e.target);\n if (isImageResult(resultElement)) {\n e.preventDefault();\n searxng.selectImage(resultElement);\n }\n }\n });\n\n searxng.on('.result a', 'focus', function (e) {\n if (!isElementInDetail(e.target)) {\n let resultElement = getResultElement(e.target);\n if (resultElement && resultElement.getAttribute(\"data-vim-selected\") === null) {\n highlightResult(resultElement)(true);\n }\n if (isImageResult(resultElement)) {\n searxng.selectImage(resultElement);\n }\n }\n }, true);\n\n /* common base for layouts */\n var baseKeyBinding = {\n 'Escape': {\n key: 'ESC',\n fun: removeFocus,\n des: 'remove focus from the focused input',\n cat: 'Control'\n },\n 'h': {\n key: 'h',\n fun: toggleHelp,\n des: 'toggle help window',\n cat: 'Other'\n },\n 'i': {\n key: 'i',\n fun: searchInputFocus,\n des: 'focus on the search input',\n cat: 'Control'\n },\n 'n': {\n key: 'n',\n fun: GoToNextPage(),\n des: 'go to next page',\n cat: 'Results'\n },\n 'o': {\n key: 'o',\n fun: openResult(false),\n des: 'open search result',\n cat: 'Results'\n },\n 'p': {\n key: 'p',\n fun: GoToPreviousPage(),\n des: 'go to previous page',\n cat: 'Results'\n },\n 'r': {\n key: 'r',\n fun: reloadPage,\n des: 'reload page from the server',\n cat: 'Control'\n },\n 't': {\n key: 't',\n fun: openResult(true),\n des: 'open the result in a new tab',\n cat: 'Results'\n },\n };\n var keyBindingLayouts = {\n\n \"default\": Object.assign(\n { /* SearXNG layout */\n 'ArrowLeft': {\n key: '←',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 'ArrowRight': {\n key: '→',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n }, baseKeyBinding),\n\n 'vim': Object.assign(\n { /* Vim-like Key Layout. */\n 'b': {\n key: 'b',\n fun: scrollPage(-window.innerHeight),\n des: 'scroll one page up',\n cat: 'Navigation'\n },\n 'f': {\n key: 'f',\n fun: scrollPage(window.innerHeight),\n des: 'scroll one page down',\n cat: 'Navigation'\n },\n 'u': {\n key: 'u',\n fun: scrollPage(-window.innerHeight / 2),\n des: 'scroll half a page up',\n cat: 'Navigation'\n },\n 'd': {\n key: 'd',\n fun: scrollPage(window.innerHeight / 2),\n des: 'scroll half a page down',\n cat: 'Navigation'\n },\n 'g': {\n key: 'g',\n fun: scrollPageTo(-document.body.scrollHeight, 'top'),\n des: 'scroll to the top of the page',\n cat: 'Navigation'\n },\n 'v': {\n key: 'v',\n fun: scrollPageTo(document.body.scrollHeight, 'bottom'),\n des: 'scroll to the bottom of the page',\n cat: 'Navigation'\n },\n 'k': {\n key: 'k',\n fun: highlightResult('up'),\n des: 'select previous search result',\n cat: 'Results'\n },\n 'j': {\n key: 'j',\n fun: highlightResult('down'),\n des: 'select next search result',\n cat: 'Results'\n },\n }, baseKeyBinding)\n }\n\n var keyBindings = keyBindingLayouts[searxng.settings.hotkeys] || keyBindingLayouts.default;\n\n searxng.on(document, \"keydown\", function (e) {\n // check for modifiers so we don't break browser's hotkeys\n if (\n Object.prototype.hasOwnProperty.call(keyBindings, e.key)\n && !e.ctrlKey && !e.altKey\n && !e.shiftKey && !e.metaKey\n ) {\n var tagName = e.target.tagName.toLowerCase();\n if (e.key === 'Escape') {\n keyBindings[e.key].fun(e);\n } else {\n if (e.target === document.body || tagName === 'a' || tagName === 'button') {\n e.preventDefault();\n keyBindings[e.key].fun();\n }\n }\n }\n });\n\n function highlightResult (which) {\n return function (noScroll, keepFocus) {\n var current = document.querySelector('.result[data-vim-selected]'),\n effectiveWhich = which;\n if (current === null) {\n // no selection : choose the first one\n current = document.querySelector('.result');\n if (current === null) {\n // no first one : there are no results\n return;\n }\n // replace up/down actions by selecting first one\n if (which === \"down\" || which === \"up\") {\n effectiveWhich = current;\n }\n }\n\n var next, results = document.querySelectorAll('.result');\n results = Array.from(results); // convert NodeList to Array for further use\n\n if (typeof effectiveWhich !== 'string') {\n next = effectiveWhich;\n } else {\n switch (effectiveWhich) {\n case 'visible':\n var top = document.documentElement.scrollTop || document.body.scrollTop;\n var bot = top + document.documentElement.clientHeight;\n\n for (var i = 0; i < results.length; i++) {\n next = results[i];\n var etop = next.offsetTop;\n var ebot = etop + next.clientHeight;\n\n if ((ebot <= bot) && (etop > top)) {\n break;\n }\n }\n break;\n case 'down':\n next = results[results.indexOf(current) + 1] || current;\n break;\n case 'up':\n next = results[results.indexOf(current) - 1] || current;\n break;\n case 'bottom':\n next = results[results.length - 1];\n break;\n case 'top':\n /* falls through */\n default:\n next = results[0];\n }\n }\n\n if (next) {\n current.removeAttribute('data-vim-selected');\n next.setAttribute('data-vim-selected', 'true');\n if (!keepFocus) {\n var link = next.querySelector('h3 a') || next.querySelector('a');\n if (link !== null) {\n link.focus();\n }\n }\n if (!noScroll) {\n scrollPageToSelected();\n }\n }\n };\n }\n\n function reloadPage () {\n document.location.reload(true);\n }\n\n function removeFocus (e) {\n const tagName = e.target.tagName.toLowerCase();\n if (document.activeElement && (tagName === 'input' || tagName === 'select' || tagName === 'textarea')) {\n document.activeElement.blur();\n } else {\n searxng.closeDetail();\n }\n }\n\n function pageButtonClick (css_selector) {\n return function () {\n var button = document.querySelector(css_selector);\n if (button) {\n button.click();\n }\n };\n }\n\n function GoToNextPage () {\n return pageButtonClick('nav#pagination .next_page button[type=\"submit\"]');\n }\n\n function GoToPreviousPage () {\n return pageButtonClick('nav#pagination .previous_page button[type=\"submit\"]');\n }\n\n function scrollPageToSelected () {\n var sel = document.querySelector('.result[data-vim-selected]');\n if (sel === null) {\n return;\n }\n var wtop = document.documentElement.scrollTop || document.body.scrollTop,\n wheight = document.documentElement.clientHeight,\n etop = sel.offsetTop,\n ebot = etop + sel.clientHeight,\n offset = 120;\n // first element ?\n if ((sel.previousElementSibling === null) && (ebot < wheight)) {\n // set to the top of page if the first element\n // is fully included in the viewport\n window.scroll(window.scrollX, 0);\n return;\n }\n if (wtop > (etop - offset)) {\n window.scroll(window.scrollX, etop - offset);\n } else {\n var wbot = wtop + wheight;\n if (wbot < (ebot + offset)) {\n window.scroll(window.scrollX, ebot - wheight + offset);\n }\n }\n }\n\n function scrollPage (amount) {\n return function () {\n window.scrollBy(0, amount);\n highlightResult('visible')();\n };\n }\n\n function scrollPageTo (position, nav) {\n return function () {\n window.scrollTo(0, position);\n highlightResult(nav)();\n };\n }\n\n function searchInputFocus () {\n window.scrollTo(0, 0);\n var q = document.querySelector('#q');\n q.focus();\n if (q.setSelectionRange) {\n var len = q.value.length;\n q.setSelectionRange(len, len);\n }\n }\n\n function openResult (newTab) {\n return function () {\n var link = document.querySelector('.result[data-vim-selected] h3 a');\n if (link === null) {\n link = document.querySelector('.result[data-vim-selected] > a');\n }\n if (link !== null) {\n var url = link.getAttribute('href');\n if (newTab) {\n window.open(url);\n } else {\n window.location.href = url;\n }\n }\n };\n }\n\n function initHelpContent (divElement) {\n var categories = {};\n\n for (var k in keyBindings) {\n var key = keyBindings[k];\n categories[key.cat] = categories[key.cat] || [];\n categories[key.cat].push(key);\n }\n\n var sorted = Object.keys(categories).sort(function (a, b) {\n return categories[b].length - categories[a].length;\n });\n\n if (sorted.length === 0) {\n return;\n }\n\n var html = '
×';\n html += '
How to navigate SearXNG with hotkeys
';\n html += '
';\n\n for (var i = 0; i < sorted.length; i++) {\n var cat = categories[sorted[i]];\n\n var lastCategory = i === (sorted.length - 1);\n var first = i % 2 === 0;\n\n if (first) {\n html += '';\n }\n html += '';\n\n html += '' + cat[0].cat + '';\n html += '';\n\n for (var cj in cat) {\n html += '- ' + cat[cj].key + ' ' + cat[cj].des + '
';\n }\n\n html += ' ';\n html += ' | '; // col-sm-*\n\n if (!first || lastCategory) {\n html += '
'; // row\n }\n }\n\n html += '
';\n\n divElement.innerHTML = html;\n }\n\n function toggleHelp () {\n var helpPanel = document.querySelector('#vim-hotkeys-help');\n if (helpPanel === undefined || helpPanel === null) {\n // first call\n helpPanel = document.createElement('div');\n helpPanel.id = 'vim-hotkeys-help';\n helpPanel.className = 'dialog-modal';\n initHelpContent(helpPanel);\n var body = document.getElementsByTagName('body')[0];\n body.appendChild(helpPanel);\n } else {\n // togggle hidden\n helpPanel.classList.toggle('invisible');\n return;\n }\n }\n\n searxng.scrollPageToSelected = scrollPageToSelected;\n searxng.selectNext = highlightResult('down');\n searxng.selectPrevious = highlightResult('up');\n});\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global L */\n(function (w, d, searxng) {\n 'use strict';\n\n searxng.ready(function () {\n searxng.on('.searxng_init_map', 'click', function (event) {\n // no more request\n this.classList.remove(\"searxng_init_map\");\n\n //\n var leaflet_target = this.dataset.leafletTarget;\n var map_lon = parseFloat(this.dataset.mapLon);\n var map_lat = parseFloat(this.dataset.mapLat);\n var map_zoom = parseFloat(this.dataset.mapZoom);\n var map_boundingbox = JSON.parse(this.dataset.mapBoundingbox);\n var map_geojson = JSON.parse(this.dataset.mapGeojson);\n\n searxng.loadStyle('css/leaflet.css');\n searxng.loadScript('js/leaflet.js', function () {\n var map_bounds = null;\n if (map_boundingbox) {\n var southWest = L.latLng(map_boundingbox[0], map_boundingbox[2]);\n var northEast = L.latLng(map_boundingbox[1], map_boundingbox[3]);\n map_bounds = L.latLngBounds(southWest, northEast);\n }\n\n // init map\n var map = L.map(leaflet_target);\n // create the tile layer with correct attribution\n var osmMapnikUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n var osmMapnikAttrib = 'Map data ©
OpenStreetMap contributors';\n var osmMapnik = new L.TileLayer(osmMapnikUrl, {minZoom: 1, maxZoom: 19, attribution: osmMapnikAttrib});\n var osmWikimediaUrl = 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png';\n var osmWikimediaAttrib = 'Wikimedia maps | Maps data ©
OpenStreetMap contributors';\n var osmWikimedia = new L.TileLayer(osmWikimediaUrl, {minZoom: 1, maxZoom: 19, attribution: osmWikimediaAttrib});\n // init map view\n if (map_bounds) {\n // TODO hack: https://github.com/Leaflet/Leaflet/issues/2021\n // Still useful ?\n setTimeout(function () {\n map.fitBounds(map_bounds, {\n maxZoom: 17\n });\n }, 0);\n } else if (map_lon && map_lat) {\n if (map_zoom) {\n map.setView(new L.latLng(map_lat, map_lon), map_zoom);\n } else {\n map.setView(new L.latLng(map_lat, map_lon), 8);\n }\n }\n\n map.addLayer(osmMapnik);\n\n var baseLayers = {\n \"OSM Mapnik\": osmMapnik,\n \"OSM Wikimedia\": osmWikimedia,\n };\n\n L.control.layers(baseLayers).addTo(map);\n\n if (map_geojson) {\n L.geoJson(map_geojson).addTo(map);\n } /* else if(map_bounds) {\n L.rectangle(map_bounds, {color: \"#ff7800\", weight: 3, fill:false}).addTo(map);\n } */\n });\n\n // this event occour only once per element\n event.preventDefault();\n });\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'preferences') {\n return;\n }\n\n searxng.ready(function () {\n let engine_descriptions = null;\n function load_engine_descriptions () {\n if (engine_descriptions == null) {\n searxng.http(\"GET\", \"engine_descriptions.json\").then(function (content) {\n engine_descriptions = JSON.parse(content);\n for (const [engine_name, description] of Object.entries(engine_descriptions)) {\n let elements = d.querySelectorAll('[data-engine-name=\"' + engine_name + '\"] .engine-description');\n for (const element of elements) {\n let source = ' (
' + searxng.settings.translations.Source + ': ' + description[1] + ')';\n element.innerHTML = description[0] + source;\n }\n }\n });\n }\n }\n\n for (const el of d.querySelectorAll('[data-engine-name]')) {\n searxng.on(el, 'mouseenter', load_engine_descriptions);\n }\n });\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n(function (w, d, searxng) {\n 'use strict';\n\n if (searxng.endpoint !== 'results') {\n return;\n }\n\n searxng.ready(function () {\n d.querySelectorAll('#urls img.image').forEach(\n img =>\n img.addEventListener(\n 'error', () => {\n img.style.display = 'none';\n img.error = null;\n }\n ));\n\n d.querySelector('#search_url button#copy_url').style.display = \"block\";\n\n searxng.on('.btn-collapse', 'click', function () {\n var btnLabelCollapsed = this.getAttribute('data-btn-text-collapsed');\n var btnLabelNotCollapsed = this.getAttribute('data-btn-text-not-collapsed');\n var target = this.getAttribute('data-target');\n var targetElement = d.querySelector(target);\n var html = this.innerHTML;\n if (this.classList.contains('collapsed')) {\n html = html.replace(btnLabelCollapsed, btnLabelNotCollapsed);\n } else {\n html = html.replace(btnLabelNotCollapsed, btnLabelCollapsed);\n }\n this.innerHTML = html;\n this.classList.toggle('collapsed');\n targetElement.classList.toggle('invisible');\n });\n\n searxng.on('.media-loader', 'click', function () {\n var target = this.getAttribute('data-target');\n var iframe_load = d.querySelector(target + ' > iframe');\n var srctest = iframe_load.getAttribute('src');\n if (srctest === null || srctest === undefined || srctest === false) {\n iframe_load.setAttribute('src', iframe_load.getAttribute('data-src'));\n }\n });\n\n searxng.on('#copy_url', 'click', function () {\n var target = this.parentElement.querySelector('pre');\n navigator.clipboard.writeText(target.innerText);\n this.innerText = this.dataset.copiedText;\n });\n\n searxng.selectImage = function (resultElement) {\n /* eslint no-unused-vars: 0 */\n if (resultElement) {\n // load full size image in background\n const imgElement = resultElement.querySelector('.result-images-source img');\n const thumbnailElement = resultElement.querySelector('.image_thumbnail');\n const detailElement = resultElement.querySelector('.detail');\n if (imgElement) {\n const imgSrc = imgElement.getAttribute('data-src');\n if (imgSrc) {\n const loader = d.createElement('div');\n const imgLoader = new Image();\n\n loader.classList.add('loader');\n detailElement.appendChild(loader);\n\n imgLoader.onload = e => {\n imgElement.src = imgSrc;\n loader.remove();\n };\n imgLoader.onerror = e => {\n loader.remove();\n };\n imgLoader.src = imgSrc;\n imgElement.src = thumbnailElement.src;\n imgElement.removeAttribute('data-src');\n }\n }\n }\n d.getElementById('results').classList.add('image-detail-open');\n searxng.scrollPageToSelected();\n }\n\n searxng.closeDetail = function (e) {\n d.getElementById('results').classList.remove('image-detail-open');\n searxng.scrollPageToSelected();\n }\n searxng.on('.result-detail-close', 'click', e => {\n e.preventDefault();\n searxng.closeDetail();\n });\n searxng.on('.result-detail-previous', 'click', e => searxng.selectPrevious(false));\n searxng.on('.result-detail-next', 'click', e => searxng.selectNext(false));\n\n w.addEventListener('scroll', function () {\n var e = d.getElementById('backToTop'),\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n results = d.getElementById('results');\n if (e !== null) {\n if (scrollTop >= 100) {\n results.classList.add('scrolling');\n } else {\n results.classList.remove('scrolling');\n }\n }\n }, true);\n\n });\n\n})(window, document, window.searxng);\n","/* SPDX-License-Identifier: AGPL-3.0-or-later */\n/* global AutoComplete */\n(function (w, d, searxng) {\n 'use strict';\n\n var qinput_id = \"q\", qinput;\n\n const isMobile = window.matchMedia(\"only screen and (max-width: 50em)\").matches;\n\n function submitIfQuery () {\n if (qinput.value.length > 0) {\n var search = document.getElementById('search');\n setTimeout(search.submit.bind(search), 0);\n }\n }\n\n function createClearButton (qinput) {\n var cs = document.getElementById('clear_search');\n var updateClearButton = function () {\n if (qinput.value.length === 0) {\n cs.classList.add(\"empty\");\n } else {\n cs.classList.remove(\"empty\");\n }\n };\n\n // update status, event listener\n updateClearButton();\n cs.addEventListener('click', function (ev) {\n qinput.value = '';\n qinput.focus();\n updateClearButton();\n ev.preventDefault();\n });\n qinput.addEventListener('keyup', updateClearButton, false);\n }\n\n searxng.ready(function () {\n qinput = d.getElementById(qinput_id);\n\n if (qinput !== null) {\n // clear button\n createClearButton(qinput);\n\n // autocompleter\n if (searxng.settings.autocomplete_provider) {\n searxng.autocomplete = AutoComplete.call(w, {\n Url: \"./autocompleter\",\n EmptyMessage: searxng.settings.translations.no_item_found,\n HttpMethod: searxng.settings.http_method,\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n MinChars: searxng.settings.autocomplete_min,\n Delay: 300,\n _Position: function () {},\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onmousedown = function () {\n params._Select(li);\n };\n }\n });\n },\n _Select: function (item) {\n AutoComplete.defaults._Select.call(this, item);\n var form = item.closest('form');\n if (form) {\n form.submit();\n }\n },\n _MinChars: function () {\n if (this.Input.value.indexOf('!') > -1) {\n return 0;\n } else {\n return AutoComplete.defaults._MinChars.call(this);\n }\n },\n KeyboardMappings: Object.assign({}, AutoComplete.defaults.KeyboardMappings, {\n \"KeyUpAndDown_up\": Object.assign({}, AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up, {\n Callback: function (event) {\n AutoComplete.defaults.KeyboardMappings.KeyUpAndDown_up.Callback.call(this, event);\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive) {\n AutoComplete.defaults._Select.call(this, liActive);\n }\n },\n }),\n \"Tab\": Object.assign({}, AutoComplete.defaults.KeyboardMappings.Enter, {\n Conditions: [{\n Is: 9,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n AutoComplete.defaults._Select.call(this, liActive);\n event.preventDefault();\n }\n }\n },\n })\n }),\n }, \"#\" + qinput_id);\n }\n\n /*\n Monkey patch autocomplete.js to fix a bug\n With the POST method, the values are not URL encoded: query like \"1 + 1\" are sent as \"1 1\" since space are URL encoded as plus.\n See HTML specifications:\n * HTML5: https://url.spec.whatwg.org/#concept-urlencoded-serializer\n * HTML4: https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1\n\n autocomplete.js does not URL encode the name and values:\n https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/src/autocomplete.ts#L665\n\n The monkey patch overrides the compiled version of the ajax function.\n See https://github.com/autocompletejs/autocomplete.js/blob/87069524f3b95e68f1b54d8976868e0eac1b2c83/dist/autocomplete.js#L143-L158\n The patch changes only the line 156 from\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n to\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n\n Related to:\n * https://github.com/autocompletejs/autocomplete.js/issues/78\n * https://github.com/searxng/searxng/issues/1695\n */\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n } else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(params._Pre()));\n }\n };\n\n if (!isMobile && document.querySelector('.index_endpoint')) {\n qinput.focus();\n }\n }\n\n // Additionally to searching when selecting a new category, we also\n // automatically start a new search request when the user changes a search\n // filter (safesearch, time range or language) (this requires JavaScript\n // though)\n if (\n qinput !== null\n && searxng.settings.search_on_category_select\n // If .search_filters is undefined (invisible) we are on the homepage and\n // hence don't have to set any listeners\n && d.querySelector(\".search_filters\") != null\n ) {\n searxng.on(d.getElementById('safesearch'), 'change', submitIfQuery);\n searxng.on(d.getElementById('time_range'), 'change', submitIfQuery);\n searxng.on(d.getElementById('language'), 'change', submitIfQuery);\n }\n\n // most common browsers at the time of writing this support :has, except for Firefox\n // can be removed when Firefox / Firefox ESL starts supporting it as well\n try {\n // this fails when the browser does not support :has\n d.querySelector(\"html:has(body)\");\n } catch (_) {\n // manually deselect the old selection when a new category is selected\n for (let button of d.querySelectorAll(\"button.category_button\")) {\n searxng.on(button, 'click', () => {\n const selected = d.querySelector(\"button.category_button.selected\");\n console.log(selected);\n selected.classList.remove(\"selected\");\n })\n }\n }\n });\n\n})(window, document, window.searxng);\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.AutoComplete = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i
@baptistedonaux\n */\nvar AutoComplete = /** @class */ (function () {\n // Constructor\n function AutoComplete(params, selector) {\n if (params === void 0) { params = {}; }\n if (selector === void 0) { selector = \"[data-autocomplete]\"; }\n if (Array.isArray(selector)) {\n selector.forEach(function (s) {\n new AutoComplete(params, s);\n });\n }\n else if (typeof selector == \"string\") {\n var elements = document.querySelectorAll(selector);\n Array.prototype.forEach.call(elements, function (input) {\n new AutoComplete(params, input);\n });\n }\n else {\n var specificParams = AutoComplete.merge(AutoComplete.defaults, params, {\n DOMResults: document.createElement(\"div\")\n });\n AutoComplete.prototype.create(specificParams, selector);\n return specificParams;\n }\n }\n AutoComplete.prototype.create = function (params, element) {\n params.Input = element;\n if (params.Input.nodeName.match(/^INPUT$/i) && (params.Input.hasAttribute(\"type\") === false || params.Input.getAttribute(\"type\").match(/^TEXT|SEARCH$/i))) {\n params.Input.setAttribute(\"autocomplete\", \"off\");\n params._Position(params);\n params.Input.parentNode.appendChild(params.DOMResults);\n params.$Listeners = {\n blur: params._Blur.bind(params),\n destroy: AutoComplete.prototype.destroy.bind(null, params),\n focus: params._Focus.bind(params),\n keyup: AutoComplete.prototype.event.bind(null, params, EventType.KEYUP),\n keydown: AutoComplete.prototype.event.bind(null, params, EventType.KEYDOWN),\n position: params._Position.bind(params)\n };\n for (var event in params.$Listeners) {\n params.Input.addEventListener(event, params.$Listeners[event]);\n }\n }\n };\n AutoComplete.prototype.getEventsByType = function (params, type) {\n var mappings = {};\n for (var key in params.KeyboardMappings) {\n var event = EventType.KEYUP;\n if (params.KeyboardMappings[key].Event !== undefined) {\n event = params.KeyboardMappings[key].Event;\n }\n if (event == type) {\n mappings[key] = params.KeyboardMappings[key];\n }\n }\n return mappings;\n };\n AutoComplete.prototype.event = function (params, type, event) {\n var eventIdentifier = function (condition) {\n if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && mapping.Operator == ConditionOperator.OR)) {\n condition = AutoComplete.merge({\n Not: false\n }, condition);\n if (condition.hasOwnProperty(\"Is\")) {\n if (condition.Is == event.keyCode) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n else if (condition.hasOwnProperty(\"From\") && condition.hasOwnProperty(\"To\")) {\n if (event.keyCode >= condition.From && event.keyCode <= condition.To) {\n match = !condition.Not;\n }\n else {\n match = condition.Not;\n }\n }\n }\n };\n for (var name in AutoComplete.prototype.getEventsByType(params, type)) {\n var mapping = AutoComplete.merge({\n Operator: ConditionOperator.AND\n }, params.KeyboardMappings[name]), match = ConditionOperator.AND == mapping.Operator;\n mapping.Conditions.forEach(eventIdentifier);\n if (match === true) {\n mapping.Callback.call(params, event);\n }\n }\n };\n AutoComplete.prototype.makeRequest = function (params, callback, callbackErr) {\n var propertyHttpHeaders = Object.getOwnPropertyNames(params.HttpHeaders), request = new XMLHttpRequest(), method = params._HttpMethod(), url = params._Url(), queryParams = params._Pre(), queryParamsStringify = encodeURIComponent(params._QueryArg()) + \"=\" + encodeURIComponent(queryParams);\n if (method.match(/^GET$/i)) {\n if (url.indexOf(\"?\") !== -1) {\n url += \"&\" + queryParamsStringify;\n }\n else {\n url += \"?\" + queryParamsStringify;\n }\n }\n request.open(method, url, true);\n for (var i = propertyHttpHeaders.length - 1; i >= 0; i--) {\n request.setRequestHeader(propertyHttpHeaders[i], params.HttpHeaders[propertyHttpHeaders[i]]);\n }\n request.onreadystatechange = function () {\n if (request.readyState == 4 && request.status == 200) {\n params.$Cache[queryParams] = request.response;\n callback(request.response);\n }\n else if (request.status >= 400) {\n callbackErr();\n }\n };\n return request;\n };\n AutoComplete.prototype.ajax = function (params, request, timeout) {\n if (timeout === void 0) { timeout = true; }\n if (params.$AjaxTimer) {\n window.clearTimeout(params.$AjaxTimer);\n }\n if (timeout === true) {\n params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, request, false), params.Delay);\n }\n else {\n if (params.Request) {\n params.Request.abort();\n }\n params.Request = request;\n params.Request.send(params._QueryArg() + \"=\" + params._Pre());\n }\n };\n AutoComplete.prototype.cache = function (params, callback, callbackErr) {\n var response = params._Cache(params._Pre());\n if (response === undefined) {\n var request = AutoComplete.prototype.makeRequest(params, callback, callbackErr);\n AutoComplete.prototype.ajax(params, request);\n }\n else {\n callback(response);\n }\n };\n AutoComplete.prototype.destroy = function (params) {\n for (var event in params.$Listeners) {\n params.Input.removeEventListener(event, params.$Listeners[event]);\n }\n params.DOMResults.parentNode.removeChild(params.DOMResults);\n };\n AutoComplete.merge = function () {\n var merge = {}, tmp;\n for (var i = 0; i < arguments.length; i++) {\n for (tmp in arguments[i]) {\n merge[tmp] = arguments[i][tmp];\n }\n }\n return merge;\n };\n AutoComplete.defaults = {\n Delay: 150,\n EmptyMessage: \"No result here\",\n Highlight: {\n getRegex: function (value) {\n return new RegExp(value, \"ig\");\n },\n transform: function (value) {\n return \"\" + value + \"\";\n }\n },\n HttpHeaders: {\n \"Content-type\": \"application/x-www-form-urlencoded\"\n },\n Limit: 0,\n MinChars: 0,\n HttpMethod: \"GET\",\n QueryArg: \"q\",\n Url: null,\n KeyboardMappings: {\n \"Enter\": {\n Conditions: [{\n Is: 13,\n Not: false\n }],\n Callback: function (event) {\n if (this.DOMResults.getAttribute(\"class\").indexOf(\"open\") != -1) {\n var liActive = this.DOMResults.querySelector(\"li.active\");\n if (liActive !== null) {\n event.preventDefault();\n this._Select(liActive);\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n }\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_down\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYDOWN\n },\n \"KeyUpAndDown_up\": {\n Conditions: [{\n Is: 38,\n Not: false\n },\n {\n Is: 40,\n Not: false\n }],\n Callback: function (event) {\n event.preventDefault();\n var first = this.DOMResults.querySelector(\"li:first-child:not(.locked)\"), last = this.DOMResults.querySelector(\"li:last-child:not(.locked)\"), active = this.DOMResults.querySelector(\"li.active\");\n if (active) {\n var currentIndex = Array.prototype.indexOf.call(active.parentNode.children, active), position = currentIndex + (event.keyCode - 39), lisCount = this.DOMResults.getElementsByTagName(\"li\").length;\n if (position < 0) {\n position = lisCount - 1;\n }\n else if (position >= lisCount) {\n position = 0;\n }\n active.classList.remove(\"active\");\n active.parentElement.children.item(position).classList.add(\"active\");\n }\n else if (last && event.keyCode == 38) {\n last.classList.add(\"active\");\n }\n else if (first) {\n first.classList.add(\"active\");\n }\n },\n Operator: ConditionOperator.OR,\n Event: EventType.KEYUP\n },\n \"AlphaNum\": {\n Conditions: [{\n Is: 13,\n Not: true\n }, {\n From: 35,\n To: 40,\n Not: true\n }],\n Callback: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\"), currentValue = this._Pre();\n if (currentValue !== \"\" && currentValue.length >= this._MinChars()) {\n if (!oldValue || currentValue != oldValue) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n AutoComplete.prototype.cache(this, function (response) {\n this._Render(this._Post(response));\n this._Open();\n }.bind(this), this._Error);\n }\n else {\n this._Close();\n }\n },\n Operator: ConditionOperator.AND,\n Event: EventType.KEYUP\n }\n },\n DOMResults: null,\n Request: null,\n Input: null,\n /**\n * Return the message when no result returns\n */\n _EmptyMessage: function () {\n var emptyMessage = \"\";\n if (this.Input.hasAttribute(\"data-autocomplete-empty-message\")) {\n emptyMessage = this.Input.getAttribute(\"data-autocomplete-empty-message\");\n }\n else if (this.EmptyMessage !== false) {\n emptyMessage = this.EmptyMessage;\n }\n else {\n emptyMessage = \"\";\n }\n return emptyMessage;\n },\n /**\n * Returns the maximum number of results\n */\n _Limit: function () {\n var limit = this.Input.getAttribute(\"data-autocomplete-limit\");\n if (isNaN(limit) || limit === null) {\n return this.Limit;\n }\n return parseInt(limit, 10);\n },\n /**\n * Returns the minimum number of characters entered before firing ajax\n */\n _MinChars: function () {\n var minchars = this.Input.getAttribute(\"data-autocomplete-minchars\");\n if (isNaN(minchars) || minchars === null) {\n return this.MinChars;\n }\n return parseInt(minchars, 10);\n },\n /**\n * Apply transformation on labels response\n */\n _Highlight: function (label) {\n return label.replace(this.Highlight.getRegex(this._Pre()), this.Highlight.transform);\n },\n /**\n * Returns the HHTP method to use\n */\n _HttpMethod: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-method\")) {\n return this.Input.getAttribute(\"data-autocomplete-method\");\n }\n return this.HttpMethod;\n },\n /**\n * Returns the query param to use\n */\n _QueryArg: function () {\n if (this.Input.hasAttribute(\"data-autocomplete-param-name\")) {\n return this.Input.getAttribute(\"data-autocomplete-param-name\");\n }\n return this.QueryArg;\n },\n /**\n * Returns the URL to use for AJAX request\n */\n _Url: function () {\n if (this.Input.hasAttribute(\"data-autocomplete\")) {\n return this.Input.getAttribute(\"data-autocomplete\");\n }\n return this.Url;\n },\n /**\n * Manage the close\n */\n _Blur: function (now) {\n if (now === void 0) { now = false; }\n if (now) {\n this._Close();\n }\n else {\n var params = this;\n setTimeout(function () {\n params._Blur(true);\n }, 150);\n }\n },\n /**\n * Manage the cache\n */\n _Cache: function (value) {\n return this.$Cache[value];\n },\n /**\n * Manage the open\n */\n _Focus: function () {\n var oldValue = this.Input.getAttribute(\"data-autocomplete-old-value\");\n if ((!oldValue || this.Input.value != oldValue) && this._MinChars() <= this.Input.value.length) {\n this.DOMResults.setAttribute(\"class\", \"autocomplete open\");\n }\n },\n /**\n * Bind all results item if one result is opened\n */\n _Open: function () {\n var params = this;\n Array.prototype.forEach.call(this.DOMResults.getElementsByTagName(\"li\"), function (li) {\n if (li.getAttribute(\"class\") != \"locked\") {\n li.onclick = function () {\n params._Select(li);\n };\n }\n });\n },\n _Close: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n },\n /**\n * Position the results HTML element\n */\n _Position: function () {\n this.DOMResults.setAttribute(\"class\", \"autocomplete\");\n this.DOMResults.setAttribute(\"style\", \"top:\" + (this.Input.offsetTop + this.Input.offsetHeight) + \"px;left:\" + this.Input.offsetLeft + \"px;width:\" + this.Input.clientWidth + \"px;\");\n },\n /**\n * Execute the render of results DOM element\n */\n _Render: function (response) {\n var ul;\n if (typeof response == \"string\") {\n ul = this._RenderRaw(response);\n }\n else {\n ul = this._RenderResponseItems(response);\n }\n if (this.DOMResults.hasChildNodes()) {\n this.DOMResults.removeChild(this.DOMResults.childNodes[0]);\n }\n this.DOMResults.appendChild(ul);\n },\n /**\n * ResponseItems[] rendering\n */\n _RenderResponseItems: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\"), limit = this._Limit();\n // Order\n if (limit < 0) {\n response = response.reverse();\n }\n else if (limit === 0) {\n limit = response.length;\n }\n for (var item = 0; item < Math.min(Math.abs(limit), response.length); item++) {\n li.innerHTML = response[item].Label;\n li.setAttribute(\"data-autocomplete-value\", response[item].Value);\n ul.appendChild(li);\n li = document.createElement(\"li\");\n }\n return ul;\n },\n /**\n * string response rendering (RAW HTML)\n */\n _RenderRaw: function (response) {\n var ul = document.createElement(\"ul\"), li = document.createElement(\"li\");\n if (response.length > 0) {\n this.DOMResults.innerHTML = response;\n }\n else {\n var emptyMessage = this._EmptyMessage();\n if (emptyMessage !== \"\") {\n li.innerHTML = emptyMessage;\n li.setAttribute(\"class\", \"locked\");\n ul.appendChild(li);\n }\n }\n return ul;\n },\n /**\n * Deal with request response\n */\n _Post: function (response) {\n try {\n var returnResponse = [];\n //JSON return\n var json = JSON.parse(response);\n if (Object.keys(json).length === 0) {\n return \"\";\n }\n if (Array.isArray(json)) {\n for (var i = 0; i < Object.keys(json).length; i++) {\n returnResponse[returnResponse.length] = { \"Value\": json[i], \"Label\": this._Highlight(json[i]) };\n }\n }\n else {\n for (var value in json) {\n returnResponse.push({\n \"Value\": value,\n \"Label\": this._Highlight(json[value])\n });\n }\n }\n return returnResponse;\n }\n catch (event) {\n //HTML return\n return response;\n }\n },\n /**\n * Return the autocomplete value to send (before request)\n */\n _Pre: function () {\n return this.Input.value;\n },\n /**\n * Choice one result item\n */\n _Select: function (item) {\n if (item.hasAttribute(\"data-autocomplete-value\")) {\n this.Input.value = item.getAttribute(\"data-autocomplete-value\");\n }\n else {\n this.Input.value = item.innerHTML;\n }\n this.Input.setAttribute(\"data-autocomplete-old-value\", this.Input.value);\n },\n /**\n * Handle HTTP error on the request\n */\n _Error: function () {\n },\n $AjaxTimer: null,\n $Cache: {},\n $Listeners: {}\n };\n return AutoComplete;\n}());\nmodule.exports = AutoComplete;\n\n},{}]},{},[1])(1)\n});\n"],"names":["window","searxng","w","d","Element","ElementPrototype","matches","matchesSelector","webkitMatchesSelector","msMatchesSelector","selector","node","this","nodes","parentNode","document","querySelectorAll","i","prototype","callbackSafe","callback","el","e","call","exception","console","log","on","obj","eventType","useCapture","addEventListener","target","srcElement","found","parentElement","ready","readyState","bind","http","method","url","data","Promise","resolve","reject","req","XMLHttpRequest","open","timeout","onload","status","response","responseType","Error","statusText","onerror","onabort","ontimeout","send","ex","loadStyle","src","path","settings","theme_static_path","id","replace","s","getElementById","createElement","setAttribute","body","appendChild","loadScript","hasAttribute","apply","insertBefore","newNode","referenceNode","insertAfter","nextSibling","classList","add","getEndpoint","className","getElementsByTagName","values","endsWith","split","endpoint","infinite_scroll_supported","IntersectionObserverEntry","let","onlyImages","contains","newLoadSpinner","loader","replaceChildrenWith","element","children","textContent","forEach","child","loadNextPage","form","querySelector","formData","FormData","getAttribute","then","nextPageDoc","DOMParser","parseFromString","articleList","paginationElement","remove","length","articleElement","catch","err","translations","error_loading_next_page","infinite_scroll","intersectionObserveOptions","rootMargin","observedSelector","observer","IntersectionObserver","entries","paginationEntry","isIntersecting","unobserve","observe","isElementInDetail","undefined","getResultElement","isImageResult","resultElement","highlightResult","preventDefault","selectImage","baseKeyBinding","Escape","key","fun","removeFocus","des","cat","h","toggleHelp","searchInputFocus","n","GoToNextPage","o","openResult","p","GoToPreviousPage","r","reloadPage","t","keyBindingLayouts","default","Object","assign","ArrowLeft","ArrowRight","vim","b","scrollPage","innerHeight","f","u","g","scrollPageTo","scrollHeight","v","k","j","keyBindings","hotkeys","hasOwnProperty","ctrlKey","altKey","shiftKey","metaKey","tagName","toLowerCase","which","noScroll","keepFocus","current","effectiveWhich","next","results","Array","from","top","documentElement","scrollTop","bot","clientHeight","etop","offsetTop","ebot","indexOf","removeAttribute","link","focus","scrollPageToSelected","location","reload","activeElement","blur","closeDetail","pageButtonClick","css_selector","button","click","sel","wtop","wheight","offset","previousElementSibling","scroll","scrollX","wbot","amount","scrollBy","position","nav","scrollTo","q","setSelectionRange","len","value","newTab","href","initHelpContent","divElement","categories","push","sorted","keys","sort","a","html","lastCategory","first","cj","innerHTML","helpPanel","toggle","selectNext","selectPrevious","event","leaflet_target","dataset","leafletTarget","map_lon","parseFloat","mapLon","map_lat","mapLat","map_zoom","mapZoom","map_boundingbox","JSON","parse","mapBoundingbox","map_geojson","mapGeojson","map_bounds","southWest","L","latLng","northEast","latLngBounds","map","osmMapnikUrl","osmMapnikAttrib","osmMapnik","TileLayer","minZoom","maxZoom","attribution","osmWikimediaUrl","osmWikimediaAttrib","osmWikimedia","setTimeout","fitBounds","setView","addLayer","baseLayers","OSM Mapnik","OSM Wikimedia","control","layers","addTo","geoJson","engine_descriptions","load_engine_descriptions","content","engine_name","description","elements","source","Source","img","style","display","error","btnLabelCollapsed","btnLabelNotCollapsed","targetElement","iframe_load","srctest","navigator","clipboard","writeText","innerText","copiedText","imgElement","thumbnailElement","detailElement","imgSrc","imgLoader","Image","qinput_id","qinput","isMobile","matchMedia","submitIfQuery","search","submit","createClearButton","cs","updateClearButton","ev","autocomplete_provider","autocomplete","AutoComplete","Url","EmptyMessage","no_item_found","HttpMethod","http_method","HttpHeaders","Content-type","X-Requested-With","MinChars","autocomplete_min","Delay","_Position","_Open","params","DOMResults","li","onmousedown","_Select","item","defaults","closest","_MinChars","Input","KeyboardMappings","KeyUpAndDown_up","Callback","liActive","Tab","Enter","Conditions","Is","Not","ajax","request","$AjaxTimer","clearTimeout","Request","abort","encodeURIComponent","_QueryArg","_Pre","search_on_category_select","_","selected","exports","module","define","amd","global","self","c","require","code","1","ConditionOperator","EventType","isArray","input","specificParams","merge","create","nodeName","match","$Listeners","_Blur","destroy","_Focus","keyup","KEYUP","keydown","KEYDOWN","getEventsByType","type","mappings","Event","eventIdentifier","condition","mapping","Operator","AND","OR","keyCode","From","To","name","makeRequest","callbackErr","propertyHttpHeaders","getOwnPropertyNames","_HttpMethod","_Url","queryParams","queryParamsStringify","setRequestHeader","onreadystatechange","$Cache","cache","_Cache","removeEventListener","removeChild","tmp","arguments","Highlight","getRegex","RegExp","transform","Limit","QueryArg","KeyUpAndDown_down","last","active","currentIndex","lisCount","AlphaNum","oldValue","currentValue","_Render","_Post","_Error","_Close","_EmptyMessage","emptyMessage","_Limit","limit","isNaN","parseInt","minchars","_Highlight","label","now","onclick","offsetHeight","offsetLeft","clientWidth","ul","_RenderRaw","_RenderResponseItems","hasChildNodes","childNodes","reverse","Math","min","abs","Label","Value","returnResponse","json"],"mappings":";;;;;GAMAA;OAAOC,QAAU,SAAWC,EAAGC,GAE7B,aAMA,GAAID,EAAEE,QAAS,EACb,SAAWC,GACTA,EAAiBC,QAAUD,EAAiBC,SAC5CD,EAAiBE,iBACjBF,EAAiBG,uBACjBH,EAAiBI,mBACjB,SAAUC,GACR,IAAIC,EAAOC,KAAMC,GAASF,EAAKG,YAAcH,EAAKI,UAAUC,iBAAiBN,CAAQ,EAAGO,EAAI,CAAC,EAC7F,MAAOJ,EAAM,EAAEI,IAAMJ,EAAMI,IAAMN,GACjC,MAAO,CAAC,CAACE,EAAMI,EACjB,CACD,GAAEb,QAAQc,SAAS,CACtB,CAEA,SAASC,EAAcC,EAAUC,EAAIC,GACnC,IACEF,EAASG,KAAKF,EAAIC,CAAC,CAGrB,CAFE,MAAOE,GACPC,QAAQC,IAAIF,CAAS,CACvB,CACF,CAEA,IAAIvB,EAAUD,OAAOC,SAAW,GAEhCA,EAAQ0B,GAAK,SAAUC,EAAKC,EAAWT,EAAUU,GAC/CA,EAAaA,GAAc,MAC3B,GAAI,OAAOF,IAAQ,SAAU,CAE3BA,EAAIG,iBAAiBF,EAAWT,EAAUU,CAAU,CACtD,KAAO,CAEL3B,EAAE4B,iBAAiBF,EAAW,SAAUP,GACtC,IAAID,EAAKC,EAAEU,QAAUV,EAAEW,WAAYC,EAAQ,MAC3C,MAAOb,GAAMA,EAAGf,SAAWe,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