1(()=>{var e={2332:(e,t)=>{"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.AccentService=void 0;var r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.accentMap=t}var t,r,i;return t=e,(r=[{key:"normalize",value:function(e){for(var t="",n=0;n<e.length;n++)t+=this.accentMap[e.charAt(n)]||e.charAt(n);return t}}])&&n(t.prototype,r),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.AccentService=r},4720:(e,t)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.PhpDataProvider=void 0;var a=i((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=settings;if("object"!==n(t)||"string"!=typeof t.domain||"object"!==n(t.accentMap))throw new Error("Unable to read data needed for the frontend app.");this.domain=t.domain,this.accentMap=t.accentMap}));t.PhpDataProvider=a},1900:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){c=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,f(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},l(e)}function u(e,t,n){return u=d()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&h(i,n.prototype),i},u.apply(null,arguments)}function d(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}
1function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.SearchWhispererHtmlElement=void 0;var p=n(1131),m=n(4875),v=n(4720),y=n(2332),g=n(2108),b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(b,e);var t,n,r,a,l,u=(t=b,n=d(),function(){var e,r=f(t);if(n){var i=f(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c(this,e)});function b(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(e=u.call(this)).template='\n\t\t\t<style>\n\t\t\t\t#whisperer-container {\n\t\t\t\t position: absolute;\n\t\t\t\t min-width: 175px;\n\t\t\t\t font-size: 12px;\n color: black;\n\t\t\t\t background-color: white;\n\t\t\t\t border: 1px solid #c5c5c5;\n\t\t\t\t list-style: none;\n padding: 0;\n margin: 0;\n display: block;\n outline: 0;\n z-index: 100;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#whisperer-container li {\n\t\t\t\t height: 20px;\n\t\t\t\t display: block;\n\t\t\t\t cursor: pointer;\n\t\t\t\t margin: 0;\n\t\t\t\t padding: 3px 1em 3px 0.4em;\n\t\t\t\t /* Neviditelny border aby nedochazelo k poskakovani pro pridani borderu u hover. */\n\t\t\t\t border: thin solid white; \n }\n \n .activeItem {\n color: black;\n background: #95acbe;\n border: thin solid #4A6C84;\n }\n\t\t\t</style>\n\t\t\t\n\t\t\t<ul id="whisperer-container"></ul>\n\t\t',e.activeItemIndex=null,e.shadow=e.attachShadow({mode:"open"}),e.shadow.innerHTML=e.template,e.container=e.shadow.querySelector("ul#whisperer-container"),e.container.style.display="none",e.phpData=new v.PhpDataProvider,e.userInterface=new p.UserInterfaceHtmlElements,e.accentService=new y.AccentService(e.phpData.accentMap),e.container.addEventListener("click",(function(t){t.target instanceof HTMLLIElement&&(e.userInterface.searchInputField.value=t.target.innerText,(0,g.runSearch)(e.userInterface,s(e),e.phpData.domain))})),e.container.addEventListener("mouseover",(function(t){t.target instanceof HTMLLIElement&&e.setActiveItem(t.target)})),e.container.addEventListener("mouseleave",(function(){e.resetActiveItem()})),document.addEventListener("click",(function(t){e.userInterface.searchInputField.contains(t.target)||e.hideSuggestions()})),e}return r=b,(a=[{key:"setPositionUnderSearchBar",value:function(){var e=this.userInterface.searchInputField.getBoundingClientRect();this.container.style.top="".concat(e.top+window.scrollY+25,"px"),this.container.style.left="".concat(e.left,"px")}},{key:"hideSuggestions",value:function(){this.container.querySelectorAll("*").forEach((function(e){e.remove()})),this.container.style.display="none"}},{key:"showSuggestions",value:function(e){var t=this;if(void 0===this.whisperingSuggestionsList)throw new Error("Whisperer suggestions not loaded.");var n=(0,m.getMatchingNamesWithBoldedSearchedPattern)(this.accentService,e,this.whisperingSuggestionsList),r=n.length>b.maxNumberOfSuggestions?n.slice(0,b.maxNumberOfSuggestions):n;this.container.querySelectorAll("*").forEach((function(e){e.remove()})),Object.entries(r).forEach((function(e){var n=i(e,2),r=(n[0],n[1]),a=document.createElement("li");a.innerHTML=r,t.container.appendChild(a)})),this.setPositionUnderSearchBar(),this.resetActiveItem(),this.container.style.display="block"}},{key:"setSuggestionsList",value:function(e){if(void 0!==this.whisperingSuggestionsList)throw new Error("Repeatedly setting suggestions list.");this.whisperingSuggestionsList=e}},{key:"resetActiveItem",value:function(){null!==this.activeItemIndex&&null!==this.container.children.item(this.activeItemIndex)&&(this.container.children.item(this.activeItemIndex).classList.remove("activeItem"),this.activeItemIndex=null)}},{key:"setActiveItem",value:function(e){null!==this.activeItemIndex&&this.resetActiveItem(),this.activeItemIndex=Array.from(this.container.children).indexOf(e),this.container.children.item(this.activeItemIndex).classList.add("activeItem")}},{key:"setNextItemAsActive",value:function(){null!==this.activeItemIndex&&this.container.children.item(this.activeItemIndex).classList.remove("activeItem"),this.activeItemIndex=null!==this.activeItemIndex&&this.activeItemIndex+1<this.container.children.length?this.activeItemIndex=this.activeItemIndex+1:this.activeItemIndex=0,this.container.children.item(this.activeItemIndex).classList.add("activeItem"),this.userInterface.searchInputField.value=this.container.children.item(this.activeItemIndex).innerText}},{key:"setPreviousItemAsActive",value:function(){null!==this.activeItemIndex&&this.container.children.item(this.activeItemIndex).classList.remove("activeItem"),this.activeItemIndex=null!==this.activeItemIndex&&this.activeItemIndex>0?this.activeItemIndex=this.activeItemIndex-1:this.activeItemIndex=this.container.children.length-1,this.container.children.item(this.activeItemIndex).classList.add("activeItem"),this.userInterface.searchInputField.value=this.container.children.item(this.activeItemIndex).innerText}}])&&o(r.prototype,a),l&&o(r,l),Object.defineProperty(r,"prototype",{writable:!1}),b}(l(HTMLElement));t.SearchWhispererHtmlElement=b,b.maxNumberOfSuggestions=20},4875:(e,t,n)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getMatchingNamesWithBoldedSearchedPattern=t.getMatchingNames=void 0;var r=n(8959);t.getMatchingNames=function(e,t,n){var r=e.normalize(t).toLowerCase(),i=[];for(var a in n){var o=n[a];e.normalize(n[a].toLowerCase()).includes(r)&&i.push(o)}return i},t.getMatchingNamesWithBoldedSearchedPattern=function(e,t,n){var i=e.normalize(t).toLowerCase(),a=[];for(var o in n){var c=n[o];if(e.normalize(n[o].toLowerCase()).includes(i)){var s=(0,r.boldSearchPatterInString)(e,t,c);a.push(s)}}return a}},1131:(e,t)=>{"use strict";function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.UserInterfaceHtmlElements=void 0;var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isSearchRunning=!1,this.camerasContainer=document.querySelector("#tabkamery"),this.searchInputField=document.querySelector("#tabkamery #snih-search"),this.iconMagnifyingGlass=document.querySelector("#tabkamery #snih-search-img"),this.iconSpinner=document.querySelector("#tabkamery img.search_spinner.search_ico")}var t,r,i;return t=e,(r=[{key:"getSearchQuery",value:function(){return this.searchInputField.value.trim()}},{key:"showSpinnerIcon",value:function(){this.iconMagnifyingGlass.style.display="none",this.iconSpinner.style.display="block"}},{key:"showMagnifyingGlassIcon",value:function(){this.iconSpinner.style.display="none",this.iconMagnifyingGlass.style.display="block"}},{key:"showContentCamerasTables",value:function(){this.camerasContainer.querySelectorAll("table").forEach((function(e){e.style.display="table"}))}},{key:"hideContentCamerasTables",value:function(){this.camerasContainer.querySelectorAll("table").forEach((function(e){e.style.display="none"}))}},{key:"removeSearchedCamerasTable",value:function(){var e=this.camerasContainer.querySelector("#tabkameryfiltr + br");e instanceof HTMLElement&&e.remove();var t=this.camerasContainer.querySelector("#tabkameryfiltr");t instanceof HTMLElement&&t.remove()}},{key:"swapCamerasTableForSearchResultCamerasTable",value:function(e){var t=this;e.then((function(e){return e.json()})).then((function(e){t.hideContentCamerasTables(),t.camerasContainer.insertAdjacentHTML("beforeend",e),t.camerasContainer.querySelector("#btn-na-puvodni").addEventListener("click",(function(){t.searchInputField.disabled=!1,t.searchInputField.value="",t.removeSearchedCamerasTable(),t.showMagnifyingGlassIcon(),t.showContentCamerasTables()}))})).catch((function(){console.log("Searching failed.")})).finally((function(){t.isSearchRunning=!1}))}}])&&n(t.prototype,r),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.UserInterfaceHtmlElements=r},8959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boldSearchPatterInString=void 0,t.boldSearchPatterInString=function(e,t,n){var r=e.normalize(n);t=(t=e.normalize(t)).toLowerCase(),r=r.toLowerCase();for(var i=t.length,a=0,o=0;-1!==r.indexOf(t,a);){var c=(a=r.indexOf(t,a))+o,s=n.substr(c,i),l=new RegExp("("+s+")","i"),u=n.substr(c);n=n.substr(0,c)+u.replace(l,"<strong>$1</strong>"),a+=i,o+=17}return n}},5166:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadSearchTableHtmlAsPromise=void 0,t.loadSearchTableHtmlAsPromise=function(e,t){var n={method:"POST",mode:"same-origin",cache:"no-cache",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({pattern:e,domain:t})};return fetch("/share/ajax/kamery_vyhledavac2.php",n)}},2493:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadWhispererSuggestionsListAsPromise=void 0,t.loadWhispererSuggestionsListAsPromise=function(e){var t={method:"POST",mode:"same-origin",cache:"no-cache",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({domain:e})};return fetch("/share/ajax/kamery_naseptavac2.php",t)}},2108:(e,t,n)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.runSearch=void 0;var r=n(5166);t.runSearch=function(e,t,n){e.isSearchRunning=!0,e.showSpinnerIcon(),t.hideSuggestions();var i=(0,r.loadSearchTableHtmlAsPromise)(e.getSearchQuery(),n);e.swapCamerasTableForSearchResultCamerasTable(i)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{function e(){var e=document.getElementById("vlajecky");if(null!==e)for(var t=e.getElementsByTagName("li"),n=t.length-1;n>=0;n--)t[n].className=""}document.documentElement.onclick=e,window.showHide=function(t,n){"show"!=(n=n.parentNode).className&&(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()),e(),n.className=""==n.className?"show":""},window.closeAll=e})(),searchWrapToggleIE=function(){var e=document.querySelector(".searchIcon a"),t=document.querySelector("#search-wrap"),n=!1;e.addEventListener("click",(function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,n?(t.style.display="none",n=!1):(t.style.display="block",n=!0)}))},searchWrapSlideToggle=function(){var e=document.querySelector(".searchIcon a"),t=document.querySelector("#search-wrap");e.addEventListener("click",(function(e){if(e.preventDefault(),t.classList.contains("active"))t.style.height="0px",t.addEventListener("transitionend",(function(){t.classList.remove("active")}),{once:!0});else{t.classList.add("active"),t.style.height="auto";var n=t.clientHeight;t.style.height="0px",setTimeout((function(){t.style.height=n+"px"}),0)}}))},preventSendingEmptySearchBar=function(){document.querySelector("#search-wrap form.search-form").addEventListener("submit",(function(e){""===e.target.querySelector('div.search-bar input[type="text"][name="q"]').value.trim()&&e.preventDefault()}))},window.navigator.userAgent.indexOf("MSIE")>-1||window.navigator.userAgent.indexOf("Trident")>-1?window.addEventListener("load",searchWrapToggleIE,!1):window.addEventListener("load",searchWrapSlideToggle,!1),window.addEventListener("load",preventSendingEmptySearchBar,!1),(()=>{"use strict";var e=n(4720),t=n(1900),r=n(1131),i=n(2493),a=n(2108);window.addEventListener("DOMContentLoaded",(function(){var n,o=new r.UserInterfaceHtmlElements,c=new e.PhpDataProvider,s=!1;customElements.define("search-whisperer",t.SearchWhispererHtmlElement);var l=document.createElement("search-whisperer");l.setPositionUnderSearchBar(),document.querySelector("body").prepend(l),o.searchInputField.addEventListener("keyup",(function(e){if(0!==o.searchInputField.value.length)if(["Enter","NumpadEnter"].includes(e.code)){if(0===o.searchInputField.value.length&&!o.isSearchRunning)return;(0,a.runSearch)(o,l,c.domain)}else"ArrowUp"!==e.code?"ArrowDown"!==e.code?s?s&&void 0!==n&&!o.isSearchRunning&&l.showSuggestions(o.getSearchQuery()):(s=!0,(0,i.loadWhispererSuggestionsListAsPromise)(c.domain).then((function(e){return e.json()})).then((function(e){n=e,l.setSuggestionsList(n),o.isSearchRunning||l.showSuggestions(o.getSearchQuery())})).catch((function(){console.log("Retrieving suggestions failed.")}))):l.setNextItemAsActive():l.setPreviousItemAsActive()})),o.searchInputField.addEventListener("input",(function(e){0===e.target.value.length&&l.hideSuggestions()})),o.iconMagnifyingGlass.addEventListener("click",(function(){(0!==o.getSearchQuery().length||o.isSearchRunning)&&(0,a.runSearch)(o,l,c.domain)}))}))})(),(()=>{"use strict";document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector("#vysvetlivkyButton"),t=document.querySelector("#vysvetlivkyCloseButton"),n=document.querySelector("#koupani_vys");document.addEventListener("click",(function(r){r.target instanceof HTMLElement&&(r.target===e?(r.preventDefault(),"none"===n.style.display?n.style.display="block":n.style.display="none"):r.target===t||t.contains(r.target)?(r.preventDefault(),n.style.display="none"):n.contains(r.target)||(n.style.display="none"))}))}))})(),window.toggleRegionSelection=function(){event.preventDefault(),Array.prototype.slice.call(document.querySelectorAll(".mapa, .seznam, .vyber-mapa-abeceda, .vyber-abeceda-mapa")).forEac
1h((function(e){e.classList.toggle("block-visible")}))}})(); 2//# sourceMappingURL=ceskehory-app-leto.js.map
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.