1import{a as e}from"../../helpers-ePuekpbm.js";import{SliderSession as t}from"../../ndsbase/slider-session-CXdrM5uv.js";import{n}from"../../debounce-B316v5qs.js";import{t as r}from"../../splide.esm-C1--57YL.js";import{i,t as a}from"../../LiveData-BaPKfzB3.js";import{t as o}from"../../dates-CzQb5ceC.js";import{t as s}from"../../timeIntervals-D32aMY1W.js";import{m as c,u as l}from"../../utlitities-DC5Jib6W.js";import{n as u,t as d}from"../../geolocation-BZTRVG2v.js";var f=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(f.unobserve(e.target),e.target.classList.contains(`js-teaser-slider--need-ajax-loading`)||(h(e.target),m(e.target),i(e.target),o(e.target),a(e.target),s(e.target)))})}),p=e=>{let t=e.dataset.searchparameters,n=JSON.parse(t),r=d(e);return r&&(n.latitude||=r.lat,n.longitude||=r.lon,n.radius||=`50`,n.radiusSearchInputMode||=`UserLocation`,n.radiusSearchInputModeValue||=!0),e.dataset.searchparameters=JSON.stringify(n),n},m=e=>{let t=e.querySelectorAll(`.teaser-slider__more-link`);if(t.length>0){let n=e.dataset.searchparameters,r=JSON.parse(n),i=t[0].getAttribute(`href`),a=c(i+`/`,r);t[0].setAttribute(`href`,a)}},h=e=>{let i=getComputedStyle(e).getPropertyValue(`--js-spacing`),a=JSON.parse(e.querySelector(`.js-splide-i18n`).textContent)??{},o=new r(e,{perPage:1,perMove:1,pagination:!1,updateOnMove:!0,focus:`left`,slideFocus:!1,trimSpace:!1,arrows:!0,classes:{arrow:`splide__arrow btn btn--round`},i18n:a,mediaQuery:`min`,gap:i,breakpoints:{448:{perPage:2,perMove:2},696:{perPage:3,perMove:3},1280:{perPage:4,perMove:4}}}),s=()=>o.length<=o.options.perPage,c=!1;o.on(`mounted resized`,()=>{c||(c=!0,s()?(o.Components.Elements.list.classList.add(`teaser-slider__list--centered`),o.Components.Elements.arrows.classList.add(`hidden`),o.options={drag:!1}):(o.Components.Elements.list.classList.remove(`teaser-slider__list--centered`),o.Components.Elements.arrows.classList.remove(`hidden`)),setTimeout(()=>{c=!1},100))}),o.on(`arrows:updated`,()=>{let{next:e,prev:t}=o.Components.Elements;e&&t&&(s()&&(e.setAttribute(`disabled`,!0),t.setAttribute(`disabled`,!0)),o.index+o.options.perPage>=o.length?e.setAttribute(`disabled`,!0):e.removeAttribute(`disabled`))}),o.on(`resize`,n.debounce(()=>{let t=getComputedStyle(e).getPropertyValue(`--spacing`);o.options={gap:t}})),o.on(`visible hidden`,function(e){e.slide.setAttribute(`tabindex`,-1)}),o.on(`mounted move resize`,function(){let e=o.Components.Controller.getEnd()+1,t=o.index+o.options.perPage,n=t>e?e:t;o.Components.Elements.arrows.querySelector(`.js-teaser-slider-counter`).textContent=n+` / `+e});let l=new t(e,`.js-teaser-slider`);o.on(`moved`,e=>{l.storeIndex(e)}),o.on(`mounted`,()=>{let e=l.getIndex();e&&o.go(e)}),o.mount()};async function g(e){let t=e.dataset.searchparameters,r=JSON.parse(t);r.sort&&(r.sort===`random`||r.sort===`distance`)&&(r.sort===`distance`?u(null,!0)?(r=p(e),await _(e,r)):(r.sort=``,await _(e,r),e.addEventListener(`userLocationChange`,n.debounce(async()=>{r=p(e),await _(e,r)},200))):await _(e,r))}async function _(t,n){t.classList.add(`is-loading`),t.classList.add(`is-show-loading`);let r=await l(e()+`Teaser`,n);t.querySelector(`.teaser-slider__list.splide__list`).innerHTML=r,t.classList.remove(`js-teaser-slider--need-ajax-loading`),t.classList.remove(`is-loading`),t.classList.remove(`is-show-loading`),f.observe(t)}document.querySelectorAll(`.js-teaser-slider`).forEach(e=>{f.observe(e),g(e).then(e=>{})});
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.