1"use strict";(self.webpackChunkndr_unified=self.webpackChunkndr_unified||[]).push([[2659],{7349(e,t,n){var r=n(4848),a=n(6540),o=n(5338),l=n(4164);const i=JSON.parse('{"O4":false,"jn":{"S":"/assets/resources/mockdata/ausflugstipps/ausflugstipps-mock.json"},"DB":{"S":"/assets/resources/mockdata/ausflugstipps/mapbox-geocoding.json"},"Sv":true,"id":{"T3":"pk.eyJ1IjoibmRybWFwIiwiYSI6ImNsOTVhdTltaTA0c3Izb21xdWsyc3dnZXMifQ.bZ7XIQDVySA_qzTyu3S4Eg","HK":"https://mapbox.ndr.de/geocoding/v5/mapbox.places/","tu":".json?country=de&types=postcode&access_token=","Ix":"postcode,place,locality"}}');var u,s=n(3930),c=n(6417),d=n(7665),f=n(5692),p=n(3425);function h(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 m(e){var t,n,o=e.onLocationChange,l=e.onLocationRequest,i=(t=(0,a.useState)(null),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(e){i=!0,a=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw a}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(t,n)||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.")}()),u=i[0],s=i[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",className:"button locateme",title:"Standort automatisch ermitteln",onClick:function(){if(null==l||l(),!navigator.geolocation)return s("Geolocation wird von deinem Browser nicht unterstützt."),void(null==o||o(null));navigator.geolocation.getCurrentPosition(function(e){var t=e.coords,n=t.latitude,r=t.longitude;if(!Number.isFinite(n)||!Number.isFinite(r)||Math.abs(n)>90||Math.abs(r)>180)return s("Ungültige Koordinaten empfangen."),void(null==o||o(null));var a={lat:n,lon:r};s(null),null==o||o(a)},function(){s("Standortabfrage abgelehnt oder fehlgeschlagen."),null==o||o(null)},{enableHighAccuracy:!0,timeout:3e4,maximumAge:0})},children:[(0,r.jsx)("span",{className:"icon icon-compass-circle",children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28",fill:"currentColor","aria-hidden":"true",focusable:"false",children:[" ",(0,r.jsx)("title",{children:"Kompass"})," ",(0,r.jsx)("path",{d:"M14 4c5.523 0 10 4.477 10 10s-4.477 10-10 10S4 19.523 4 14 8.477 4 14 4zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm4 4l-4.5 9-.923-3.577L9 14.5l9-4.5z"})]})}),(0,r.jsx)("span",{className:"text extrasmall",children:"Standort ermitteln"})]}),u&&(0,r.jsx)("p",{id:"plz-error",role:"alert",children:u})]})}function y(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 b(e,t,n,r,a,o,l){try{var i=e[o](l),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,a)}function v(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function l(e){b(o,r,a,l,i,"next",e)}function i(e){b(o,r,a,l,i,"throw",e)}l(void 0)})}}function g(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){var r,a,o=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(e){i=!0,a=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}
vendor: 1,198 bytes, line 1
1(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 w(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:u(0)}),i(l,"throw",{value:u(1)}),i(l,"return",{value:u(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}
1if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function j(e,t){var n;if(null==t||null===(n=t.place_type)||void 0===n?void 0:n.includes("postcode")){var r=e.split(",").map(function(e){return e.trim()});if(r.length>=2)return"".concat(r[0]," ").concat(r[1])}return e.replace(/,.*$/,"").trim()}function x(e,t,n,r){var a=(n-e)*Math.PI/180,o=(r-t)*Math.PI/180,l=Math.pow(Math.sin(a/2),2)+Math.cos(e*Math.PI/180)*Math.cos(n*Math.PI/180)*Math.pow(Math.sin(o/2),2);return 2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))*6371}var S={token:i.id.T3,baseUrl:i.id.HK,suffix:i.id.tu,types:null!==(u=i.id.Ix)&&void 0!==u?u:"postcode,place,locality"};function k(e){var t=e.value,n=e.onChange,o=e.onLocationSelect,l=e.onLocationRequest,u=g((0,a.useState)(null),2),s=u[0],c=u[1],d=(0,a.useRef)(null),f=(0,a.useRef)(null),h=(0,a.useRef)(0);function y(){return v(function(){var e,t,n;return w(this,function(r){switch(r.label){case 0:return d.current?[2,d.current]:[4,fetch(i.DB.S)];case 1:if(!(e=r.sent()).ok)throw new Error("HTTP ".concat(e.status));return[4,e.json()];case 2:return t=r.sent(),n=Array.isArray(t.features)?t.features:[],d.current=n,[2,n]}})})()}function b(e){return v(function(){var t,n,r;return w(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t="".concat(S.baseUrl).concat(encodeURIComponent(e),".json")+"?country=de&types=".concat(S.types,"&language=de&autocomplete=true&limit=8&access_token=").concat(S.token),[4,fetch(t)];case 1:return(n=a.sent()).ok?[4,n.json()]:[2,[]];case 2:return r=a.sent(),[2,Array.isArray(r.features)?r.features:[]];case 3:return a.sent(),[2,[]];case 4:return[2]}})})()}function k(e,t){return v(function(){var n,r,a,o;return w(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),n="".concat(S.baseUrl).concat(t,",").concat(e,".json")+"?country=de&types=".concat(S.types,"&language=de&limit=1&access_token=").concat(S.token),[4,fetch(n)];case 1:return(r=l.sent()).ok?[4,r.json()]:[2,null];case 2:return a=l.sent(),[2,(o=Array.isArray(a.features)?a.features:[]).length>0?o[0]:null];case 3:return l.sent(),[2,null];case 4:return[2]}})})()}return(0,r.jsx)("div",{className:"form-element",children:(0,r.jsx)("form",{className:"plzsuche",onSubmit:function(e){e.preventDefault(),t||c("Bitte wähle einen Vorschlag aus der Liste.")},children:(0,r.jsxs)("div",{className:"form-element",children:[(0,r.jsx)("label",{htmlFor:"postleitzahl",className:"theta",children:"Ausflugtipps nach Ortsname/Postleitzahl oder Standort finden"}),(0,r.jsxs)("div",{className:"textinput-compact",children:[(0,r.jsx)("div",{className:"plzselect-wrap",children:(0,r.jsx)(p.A,{inputId:"postleitzahl",instanceId:"postleitzahl-select",cacheOptions:!0,defaultOptions:!1,loadOptions:function(e){var t=e.trim(),n=/^[0-9]/.test(t)?1:2;if(t.length<n)return c(null),Promise.resolve([]);f.current&&window.clearTimeout(f.current);var r=++h.current;return new Promise(function(e){f.current=window.setTimeout(function(){return v(function(){var n,a,o,l,u;return w(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),n=[],!i.O4&&i.Sv?[3,2]:[4,y()];case 1:return a=s.sent(),n=function(e,t){var n=t.toLowerCase(),r=/^[0-9]/.test(t);return e.filter(function(e){var t,a,o,l,i,u=(null!==(t=null!==(a=e.text_de)&&void 0!==a?a:e.text)&&void 0!==t?t:"").toLowerCase(),s=(null!==(o=e.place_name)&&void 0!==o?o:"").toLowerCase();return r?!(!u||!u.startsWith(n))||(null!==(l=null===(i=s.match(/^\d{4,5}
1/))||void 0===i?void 0:i[0])&&void 0!==l?l:"").startsWith(n):u.startsWith(n)||s.includes(n)}).slice(0,8)}(a,t),[3,4];case 2:return[4,b(t)];case 3:n=s.sent(),s.label=4;case 4:return o=/^[0-9]{3,5}$/.test(t.trim()),l=n.sort(function(e,t){var n,r;return o?((null===(n=e.place_type)||void 0===n?void 0:n.includes("postcode"))?0:1)-((null===(r=t.place_type)||void 0===r?void 0:r.includes("postcode"))?0:1):0}),r!==h.current?[2]:(u=l.map(function(e,t){var n;return{value:null!==(n=e.id)&&void 0!==n?n:"".concat(e.place_name,"-").concat(t),label:j(e.place_name,e),feature:e}}),c(u.length?null:"Es wurde kein Ort zu Ihrer Eingabe gefunden, bitte geben Sie einen Ort oder eine Postleitzahl ein"),e(u),[3,6]);case 5:return s.sent(),r!==h.current?[2]:(c("Autocomplete konnte nicht geladen werden."),e([]),[3,6]);case 6:return[2]}})})()},250)})},value:t,onChange:function(e){if(n(null!=e?e:null),e){var t=e.feature,r=g(t.center,2),a=r[0],l=r[1];null==o||o({lat:l,lon:a,placeName:t.place_name})}else null==o||o(null)},isClearable:!0,placeholder:"Ort/PLZ eingeben",noOptionsMessage:function(e){var t=e.inputValue,n=(null!=t?t:"").trim();if(!n)return"Ort oder Postleitzahl eingeben.";var r=/^[0-9]/.test(n),a=r?1:2;return n.length<a?r?"Bitte mindestens eine Ziffer eingeben.":"Bitte mindestens zwei Buchstaben eingeben.":"Es wurde kein Ort zu Ihrer Eingabe gefunden, bitte geben Sie einen Ort oder eine Postleitzahl ein"},loadingMessage:function(){return"Suche..."},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},classNamePrefix:"plzselect",menuPlacement:"auto","aria-describedby":s?"plz-error":void 0,"aria-invalid":!!s})}),(0,r.jsx)(m,{onLocationRequest:function(){n(null),c(null),null==l||l()},onLocationChange:function(e){!function(e){v(function(){var t,r,a,l;return w(this,function(u){switch(u.label){case 0:return u.trys.push([0,5,,6]),c(null),!i.O4&&i.Sv?[3,2]:[4,(s=e.lat,d=e.lon,v(function(){var e,t,n,r,a,o,l,i,u,c,f,p,h;return w(this,function(m){switch(m.label){case 0:return[4,y()];case 1:if(!(e=m.sent()).length)return[2,null];t=null,n=Number.POSITIVE_INFINITY,r=!0,a=!1,o=void 0;try{for(l=e[Symbol.iterator]();!(r=(i=l.next()).done);r=!0)u=i.value,c=g(u.center,2),f=c[0],p=c[1],(h=x(s,d,p,f))<n&&(n=h,t=u)}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return[2,t]}})})())];case 1:return a=u.sent(),[3,4];case 2:return[4,k(e.lat,e.lon)];case 3:a=u.sent(),u.label=4;case 4:return(r=a)?(l={value:null!==(t=r.id)&&void 0!==t?t:"geo-".concat(r.place_name,"-").concat(Date.now()),label:j(r.place_name,r),feature:r},n(l),null==o||o({lat:e.lat,lon:e.lon,placeName:r.place_name}),[3,6]):(n(null),null==o||o({lat:e.lat,lon:e.lon,placeName:"Aktueller Standort"}),c("Standort wurde ermittelt, aber kein Ort dazu gefunden."),[2]);case 5:return u.sent(),c("Standort konnte nicht in einen Ort umgewandelt werden."),[3,6];case 6:return[2]}var s,d})})()}(e)}})]})]})})})}function O(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 A(e,t,n,r,a,o,l){try{var i=e[o](l),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,a)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){I(e,t,n[t])})}return e}function N(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function P(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){var r,a,o=[],l=!0,i=!1;try{for(n=n.call(e);!(l=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);l=!0);}catch(e){i=!0,a=e}finally{try{l||null==n.return||n.return()}finally{if(i)throw a}}return o}}(e,t)||z(e,t)||function(){throw new TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function E(e){return e.map(function(e){var t,n=(t=e.keywords,Array.isArray(t)?t.filter(function(e){return"string"==typeof e}):"string"==typeof t?[t]:[]);return N(M({},e),{KeywordsLower:n.map(function(e){return e.toLowerCase()}),KeywordsNormalized:n.map(L),ModificationTimestamp:e.modificationDate?new Date(e.modificationDate).getTime():0})})}function T(e,t,n,r){var a=(n-e)*Math.PI/180,o=(r-t)*Math.PI/180,l=Math.pow(Math.sin(a/2),2)+Math.cos(e*Math.PI/180)*Math.cos(n*Math.PI/180)*Math.pow(Math.sin(o/2),2);return 2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))*6371}var C=[{label:"am Wasser",keywords:["Wassersport","Ausflüge ans Wasser"]},{label:"drinnen",keywords:["drinnen"]},{label:"Gärten & Parks",keywords:["Gärten und Parks"]},{label:"Geschichte",keywords:["Geschichte"]},{label:"Kirchen & Klöster",keywords:["Kirchen und Klöster"]},{label:"kostenlos",keywords:["kostenlos"]},{label:"mit Kindern",keywords:["mit Kindern"]},{label:"Museen",keywords:["Erlebnis-Museen"]},{label:"Natur",keywords:["Natur"]},{label:"Radtouren",keywords:["Radtouren"]},{label:"Schlösser & Burgen",keywords:["Schlösser und Burgen"]},{label:"Städte",keywords:["Städte"]},{label:"Tierparks",keywords:["Tierparks"]},{label:"Wandern",keywords:["Wandern"]}];function L(e){return e.toLowerCase().replace(/[äöüÃ]/g,function(e){return{ä:"ae",ö:"oe",ü:"ue",Ã:"ss"}[e]||e}).replace(/[-_\s]/g,"")}var F=new Map;function _(){var e,t,n=P((0,a.useState)(null),2),o=n[0],u=n[1],c=P((0,a.useState)(null),2),d=c[0],p=c[1],h=P((0,a.useState)(null),2),m=h[0],y=h[1],b=P((0,a.useState)(12),2),v=b[0],g=b[1],w=P((0,a.useState)(!1),2),j=w[0],x=w[1],S=(0,s.I)({queryKey:["ausflugstipps"],queryFn:function(){return(e=function(){var e,t,n,r,a;return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),i=Object.defineProperty;return i(l,"next",{value:u(0)}),i(l,"throw",{value:u(1)}),i(l,"return",{value:u(2)}),"function"==typeof Symbol&&i(l,Symbol.iterator,{value:function(){return this}}),l;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}
1if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,function(o){switch(o.label){case 0:if(i.O4)e=i.jn.S;else{if(!(t=document.getElementById("triptip")))throw Error("triptip Element nicht gefunden");if(!(n=t.getAttribute("data-json")))throw Error("data-json Attribut nicht gefunden");e=n}return[4,fetch(e)];case 1:if(!(r=o.sent()).ok)throw new Error("HTTP ".concat(r.status,": ").concat(r.statusText));return[4,r.json()];case 2:if(!(a=o.sent())||!Array.isArray(a.data))throw new Error("Ungültiges Datenformat");return[2,N(M({},a),{data:E(a.data)})]}})},function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function l(e){A(o,r,a,l,i,"next",e)}function i(e){A(o,r,a,l,i,"throw",e)}l(void 0)})})();var e}}),I=S.data,_=S.error,K=S.isPending,R=Array.isArray(null==I?void 0:I.data)?I.data:[],B=(0,a.useMemo)(function(){var e,t=function(e,t){if(!t)return e;var n=function(e){if(F.has(e))return F.get(e);var t=C.find(function(t){return t.label===e});if(!t)return{lower:[],normalized:[]};var n={lower:t.keywords.map(function(e){return e.toLowerCase()}),normalized:t.keywords.map(L)};return F.set(e,n),n}(t);return 0===n.lower.length?e:e.filter(function(e){var t=e.KeywordsLower||[],r=e.KeywordsNormalized||[];return n.lower.some(function(e){return t.includes(e)})||n.normalized.some(function(e){return r.includes(e)})})}(R,d);return m?t.map(function(e){var t=parseFloat(e.latitude),n=parseFloat(e.longitude);return Number.isFinite(t)&&Number.isFinite(n)?N(M({},e),{calculatedDistance:T(m.lat,m.lon,t,n)}):N(M({},e),{calculatedDistance:1/0})}).filter(function(e){return Number.isFinite(e.calculatedDistance)}).sort(function(e,t){return e.calculatedDistance-t.calculatedDistance}):(e=t,function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return t.ModificationTimestamp-e.ModificationTimestamp})},[R,d,m]),q=B.slice(0,v),W=q.length<B.length,U=(0,f.zQ)(function(e){e&&W&&!j&&(x(!0),window.setTimeout(function(){g(function(e){return Math.min(e+12,B.length)}),x(!1)},300))},{rootMargin:"200px",threshold:0});return K?(0,r.jsx)("div",{children:(0,r.jsx)("div",{role:"status","aria-live":"polite",children:"Laden..."})}):_?(0,r.jsx)("div",{role:"alert",className:"error-message",children:(e=_,t=Error,(null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t)?_.message:"Ein unbekannter Fehler ist aufgetreten.")}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"contentbox filterbuttons",role:"group","aria-label":"Filter für Ausflugstipps",children:C.map(function(e){var t=d===e.label;return(0,r.jsx)("button",{type:"button",className:(0,l.A)("button",t&&"active"),onClick:function(){return t=e.label,g(12),void p(d!==t?t:null);var t},"aria-pressed":t,"aria-describedby":t?"active-filter-desc":void 0,children:e.label},e.label)})}),(0,r.jsx)("div",{className:"locationsearch s-100 m-66",children:(0,r.jsx)(k,{value:o,onChange:u,onLocationRequest:function(){y(null)},onLocationSelect:function(e){if(!e)return g(12),p(null),y(null),void u(null);g(12),y({lat:e.lat,lon:e.lon,placeName:e.placeName})}})}),(d||m)&&(0,r.jsxs)("div",{className:"active-filter-desc",children:[d&&"Aktiver Filter: ".concat(d),d&&m&&" â ",m&&"Standort: ".concat(m.placeName)," â ",B.length," Ergebnis",1!==B.length?"se":""]}),(0,r.jsx)("div",{className:"teasergroup std group-s-100 group-m-50",role:"region","aria-live":"polite","aria-label":"".concat(q.length," von ").concat(B.length," Ausflugstipps"),children:q.map(function(e){return(0,r.jsx)(D,{teaser:e,userLocation:m},e.id)})}),W&&(0,r.jsx)("div",{ref:U,style:{height:"20px",margin:"20px 0"},children:j&&(0,r.jsx)("div",{style:{textAlign:"center",padding:"10px"},children:(0,r.jsx)("p",{children:"Weitere Ausflugstipps werden geladen..."})})}),!W&&B.length>12&&(0,r.jsx)("div",{style:{textAlign:"center",padding:"20px",color:"#666"},children:(0,r.jsxs)("p",{children:["Alle ",B.length," Ausflugstipps wurden geladen."]})})]})}function D(e){var t=e.teaser,n=e.userLocation,o=(0,a.useMemo)(function(){if(!n)return null;var e=parseFloat(t.latitude),r=parseFloat(t.longitude);return Number.isFinite(e)&&Number.isFinite(r)?T(n.lat,n.lon,e,r).toFixed(1):null},[n,t.latitude,t.longitude]);return(0,r.jsxs)("div",{className:"teaser",children:[(0,r.jsx)("div",{className:"teaserimage",children:(0,r.jsxs)("div",{className:"image-container std",children:[(0,r.jsx)("img",{src:t.image,alt:t.headline||"Ausflugstipp"})," "]})}),(0,r.jsx)("h2",{children:(0,r.jsx)("a",{href:t.url,children:t.headline})}),o&&(0,r.jsxs)("p",{children:["Entfernung: ",o," km"]}),(0,r.jsx)("div",{className:"teasertext",children:(0,r.jsx)("p",{children:t.text})})]})}var K=document.getElementById("triptip");if(K){var R=(0,o.createRoot)(K),B=new c.E;R.render((0,r.jsx)(d.Ht,{client:B,children:(0,r.jsx)(_,{})}))}else console.error('Container "#triptip" nicht gefunden â React wurde nicht gemountet.')}}]);
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.