1/******/ (function() { // webpackBootstrap 2/******/ "use strict"; 3var __webpack_exports__ = {}; 4/*!************************!*\ 5 !*** ./lib/src/app.ts ***! 6 \************************/ 7 8 9function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } 10 11function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 12 13function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 14 15var elements = document.querySelectorAll("[id='views-exposed-form-resources-index-page-1']"); 16elements.forEach(function (element) { 17 // @ts-ignore 18 element.addEventListener("submit", function (event) { 19 // log.textContent = `Form Submitted! Timestamp: ${event.timeStamp}`; 20 event.preventDefault(); // @ts-expect-error 21 22 var inputs = this.getElementsByTagName("input"); // @ts-ignore 23 24 var _iterator = _createForOfIteratorHelper(inputs), 25 _step; 26 27 try { 28 for (_iterator.s(); !(_step = _iterator.n()).done;) { 29 var cell = _step.value; 30 var status = cell.getAttribute("name"); 31 32 if (status === "keywords") { 33 window.location.href = "https://unep.org/resources/filter/keywords=".concat(cell.value); 34 } 35 } 36 } catch (err) { 37 _iterator.e(err); 38 } finally { 39 _iterator.f(); 40 } 41 }); 42}); // async function getUsersLocation(): Promise <string> { 43// return fetch('https://extreme-ip-lookup.com/json/') 44// .then( res => res.json()) 45// .then(response => { 46// return response.country; 47// }) 48// } 49 50/** 51 * Override oembed elements. 52 * 53 * As hackish as it can get 54 */ 55// function overrideOembed() { 56// const embedElement:HTMLCollectionOf<Element> = document.getElementsByTagName('oembed'); 57// for(let i = 0; i < embedElement.length; i++) { 58// // @ts-ignore 59// const innerText=axios.get(`https://embed.un-ep.site/?uri=${encodeURI(embedElement[i].innerText)}`) 60// innerText.then(function (res) { 61// const el = document.createElement('div'); 62// el.innerHTML = res.data; 63// embedElement[i].replaceWith(el) 64// }) 65// } 66// } 67// Run this on page load 68// document.addEventListener('DOMContentLoaded', async (event) => { 69// //overrideOembed(); 70// const postHogPayload = { 71// domain: window.location.host, 72// country: await getUsersLocation(), 73// path: window.location.pathname 74// } 75// if (window.location.pathname === '/resources' && postHogPayload.country === 'Kenya') { 76// posthog.init('phc_cISsqP6LMZsQpfKPtl81xJmZvUePzoI0vAUboIZKXMF', { api_host: 'https://app.posthog.com' }); 77// posthog.capture('loaded_resources_page', postHogPayload) 78// } 79// }) 80/******/ })() 81;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.