PageSourceSearch

https://plus.rtl.de/server-side-search-6f7996c50d11d308.bundle.js

js rtl.de collected 2026-09-24 08:28:17 UTC 10,525 bytes, 2 lines download raw bytes

1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__||=[]).push([[7063],{69198(e,t,n){n.d(t,{Uk:()=>a,a7:()=>l});var a="sfVttMG0iKwNjrcW",l="COk0nKbbKQGHp4Sn"},67950(e,t,n){n.d(t,{v:()=>v});var a=n(3495),l=n(65993),s=n.n(l),r=n(66751),c=n(40765),o=n(30696),i=n(55729),u=n(6369),d=n(54685);const h={slot1:{kind:"icon",attrs:{name:"Search"}},slot2:{kind:"typography",attrs:{level:"BERLIN_2"}},slot3:{kind:"icon",attrs:{name:"Cross"}},slot4:{kind:"button",attrs:{buttonMode:"quaternary"}},slot6:{kind:"typography",attrs:{level:"BERLIN_1"}},slot9:{kind:"icon",attrs:{name:"MagicWand"}},slot10:{kind:"typography",attrs:{level:"MADRID_1"}},slot12:{kind:"icon",attrs:{name:"Loading"}}},p=({label:e,onClick:t,className:n})=>{const{slot3:l}=(0,u.H)(h);return(0,a.jsx)("button",{type:"button","aria-label":e,title:e,className:n,onClick:t,children:(0,a.jsx)(i.In,{...l.attrs,className:"OQXLnoh9lEBBK8_g"})})};var b=n(7117);const m=({className:e,id:t,inputRef:n,inputValue:l,label:r,placeholder:c,onChange:o})=>{const{slot2:i}=(0,u.H)(h),p=r||c||void 0;return(0,a.jsx)(b.o,{...i.attrs,component:"div",className:s()("DS13cC6SPbM_ArLw",e),children:(0,a.jsx)("input",{id:t,type:"search","aria-label":p,placeholder:c,className:d.fl,ref:n,value:l,onChange:o,autoFocus:!0})})},f=({className:e,inputRef:t,submitButtonLabel:n,clearButtonLabel:l,placeholder:b,inputValue:f,setInputValue:g,label:v,onChange:x,onClear:y,isLoading:j=!1})=>{const{slot1:N,slot4:L,slot12:k}=(0,u.H)(h),C=(0,c.jF)(t),S=(0,r.useCallback)(e=>{f&&t?.current&&("function"==typeof y&&y(e),g(""),t.current.focus())},[t,f,y,g]);return(0,a.jsxs)("div",{className:s()("bQWS41OZ100juhd6","OTVigRq5EFMZx3Df",e,{[d.VX]:C}),children:[(0,a.jsxs)("div",{className:"TdJPlkN_V_wpMZx_",children:[(0,a.jsx)("label",{htmlFor:"search-input",children:(0,a.jsx)(i.In,{className:"Yumw1cXKQ1Cib32p",...N.attrs})}),(0,a.jsx)(m,{id:"search-input",inputRef:t,inputValue:f,label:v,placeholder:b,onChange:e=>{g(e.target.value),"function"==typeof x&&x(e)}})]}),(0,a.jsxs)("div",{className:"PBMfelT5BxA2QhCG",children:[j?(0,a.jsx)(i.In,{...k.attrs,className:"yCthGBolf6Balan3"}):null,l?(0,a.jsx)(p,{label:l,onClick:S,className:f.length?void 0:"ceLUfTy3M2KTEXEc"}):null,n?(0,a.jsx)(o.$,{...L.attrs,type:"submit",label:n,"aria-disabled":0===f.trim().length}):null]})]})},g=({className:e,children:t})=>{const{slot6:n}=(0,u.H)(h);return(0,a.jsx)(b.o,{...n.attrs,component:"p","aria-live":"polite",className:s()("elGdbXM8ZcFu0oNO","aqmVAtouYrOs0KlD",e),children:t})},v=({onSubmit:e,className:t,inputRef:n,inputLabel:l,inputValue:r,setInputValue:c,placeholder:o,clearButtonLabel:i,onClear:u,submitButtonLabel:d,onInputChange:h,isLoading:p=!1,children:b})=>(0,a.jsxs)("form",{role:"search",className:s()("PDPPcbgOiA8zTnkE","WalnXNQTvgqdT1Fc","k7d5qM0zL92xUpKj",t),onSubmit:e,children:[(0,a.jsx)(f,{className:"J0tm21dseu4y20yE",inputRef:n,inputValue:r,setInputValue:c,label:l,placeholder:o,clearButtonLabel:i,submitButtonLabel:d,isLoading:p,onChange:h,onClear:u}),(0,a.jsx)(g,{children:b})]})},49324(e,t,n){n.r(t),n.d(t,{default:()=>D});var a=n(3495),l=n(66751),s=n(70333),r=n(2740),c=n(2631),o=n.n(c),i=n(97079),u=n(96940),d=n(65993),h=n.n(d),p=n(55729);const b=({variant:e,label:t,disabled:n,"aria-hidden":l,onClick:s,className:r,"data-testid":c})=>(0,a.jsxs)("button",{type:"button",className:h()("Jjbs1uzv2pxDJJlS","EdJXKuT0G7HGmo3W",r),disabled:n,"aria-hidden":l,onClick:s,children:[(0,a.jsx)("span",{className:"sr-only",children:t}),(0,a.jsx)(p.In,{className:"D_UYB2wjhkRjasEY",name:"left"===e?p.WW.ArrowLeft:p.WW.ArrowRight,"aria-hidden":!0})]});n(76231);var m=n(54685),f=n(7117),g="YaGyb_BTXwuzxSjI",v="IlOOZo8jjK5786Nz";const x=e=>{const{kind:t,label:n,onClick:l,selected:s,className:r,"data-testid":c}=e,o="input"===t||"toggle"===t&&s,i="select"===t||"nestedSelect"===t,u="input"!==t&&e.forceStateHover,d=e.translations;return(0,a.jsxs)("button",{type:"button",className:h()(m.fl,"kCb0uNfrkxYPVE51","JXEJ3yvNuGdoOTFx",{[g]:u,[v]:"input"===t||!!s},r),onClick:l,children:[o?(0,a.jsx)(p.In,{className:"p1drF71l03oxtch_",name:p.WW.Cross,"aria-hidden":!0}):null,o?(0,a.jsx)("span",{className:"sr-only",children:d.removeLabel}):null,(0,a.jsx)(f.o,{className:"SKOJu905W0Cvs4Yv",component:"span",level:"BERLIN_1",children:n}),i?(0,a.jsx)(p.In,{className:"uuICW7cgax7ngr6n",name:p.WW.ArrowDown,"aria-hidden":!0}):null]})};var y="sGtPw13b3NKF3TC1";const j=({children:e,"aria-label":t,translations:n,className:s,"data-testid":r})=>{const c=(0,l.useRef)(null),{canScrollLeft:i,canScrollRight:u,scrollPrev:d,scrollNext:p}=(e=>{const[t,n]=(0,l.useState)({canScrollLeft:!1,canScrollRight:!1});return(0,l.useEffect)(()=>{const t=e.current;if(!t)return()=>{};const a=()=>{const e=(e=>({canScrollLeft:e.scrollLeft>0,canScrollRight:Math.ceil(e.scrollLeft+e.clientWidth)<e.scrollWidth}
1))(t);n(t=>t.canScrollLeft===e.canScrollLeft&&t.canScrollRight===e.canScrollRight?t:e)},l=o().debounce(a,100,{leading:!0,trailing:!0});a();const s=new ResizeObserver(l);s.observe(t),t.addEventListener("scroll",l,{passive:!0});const r=new MutationObserver(l);return r.observe(t,{childList:!0}),()=>{s.disconnect(),r.disconnect(),t.removeEventListener("scroll",l),l.cancel()}},[e]),{...t,scrollPrev:(0,l.useCallback)(()=>{e.current&&e.current.scrollBy({left:-.8*e.current.clientWidth,behavior:"smooth"})},[e]),scrollNext:(0,l.useCallback)(()=>{e.current&&e.current.scrollBy({left:.8*e.current.clientWidth,behavior:"smooth"})},[e])}})(c);return(0,a.jsxs)("div",{role:"group","aria-label":t,className:h()("NrTXzr90ncD2JHY3","aWFskEk12ga35qUP",s),children:[(0,a.jsx)(b,{variant:"left",label:n.scrollLeftLabel,onClick:d,className:h()("rH8yw0KtlTsRf1C4",{[y]:!i}),disabled:!i,"aria-hidden":!i}),(0,a.jsx)("div",{ref:c,className:h()(m.TH,"XfPN1pLDSi2pvTk9"),children:e}),(0,a.jsx)(b,{variant:"right",label:n.scrollRightLabel,onClick:p,className:h()("zOx_eYji1wgiUmlg",{[y]:!u}),disabled:!u,"aria-hidden":!u})]})};var N=n(98797),L=n(48538),k=n(50661);const C=e=>{const t=Object.keys(e),n={...e};for(let e=t.length-1;e>=0;e--)n[t[e]]=null;return n};var S=n(25628),I=n(43629),R=n(70054),T=n(40269),w=n(18292),B=n(27742);const E=(e,t)=>{const n=e(e=>{const t=new URL(globalThis.location.href);return(0,N.HC)({pathname:t.pathname,search:t.search}),e((0,L.Xp)({entityType:"frontspace",entityId:"search",withFacets:!0}))});return t&&n.finally(t),function(e){let t,n="pending";const a=e.then(e=>{n="success",t=e},e=>{n="error",t=e});return{read(){if("pending"===n)throw a;if("error"===n)throw t;return t},isPending:()=>"pending"===n}}(n)};var W=n(22153);const _=({input:e,minQueryLength:t,resource:n})=>{const{t:l}=(0,s.Bd)();if(0===e.length||e.length<t)return(0,a.jsx)("span",{children:l("search.minSearchMessage",{count:t})});const r=n?.read();if(r&&r.blocks){const e=r.blocks?.reduce((e,t)=>t.content&&void 0!==t.content.pagination?e+t.content.pagination.totalItems:e,0);return 0===e?(0,a.jsx)("span",{children:l("search.noResults")}):(0,a.jsx)("span",{children:"​"})}return(0,a.jsx)("span",{children:l("layout.loading")})};var A=n(67950);const O=({inputInitialValue:e,setInputCallback:t,...n})=>{const[s,r]=(0,l.useState)(e||"");return(0,l.useEffect)(()=>{t&&t(r)},[t]),(0,a.jsx)(A.v,{inputValue:s,setInputValue:r,...n})};var V=n(69198);const D=()=>{const e=(0,l.useRef)(null),t=(0,l.useRef)(null),n=(0,l.useRef)(void 0),c=(0,r.d4)(e=>(0,R.Tr)(e,"frontspace","search")),d=(0,r.wA)(),h=(0,r.d4)(W.qR),p=(0,r.d4)(W.Zt),b=(0,r.d4)(W.uw),[g,v]=(0,l.useState)({layoutSearchResource:null,layoutSearchInput:""}),{layoutSearchResource:y,layoutSearchInput:A}=g,D=(0,l.useRef)(void 0),{t:K}=(0,s.Bd)(),[,P]=(0,l.useState)(0),H=c.facets||[],[M,F]=(e=>{const t=e?.reduce((e,t)=>(e[`facet[${t.scope.param}]`]=i.cr.withDefault(!1),e),{});{const e=new URL(globalThis.location.href);e.searchParams?.forEach((e,n)=>{k.J.test(n)&&!t[n]&&(t[n]=i.cr)})}return(0,i.ab)(t)})(H),[X,U]=(0,i.ZA)("query",i.tU),J=o().throttle(e=>{t.current&&t.current.cancel(),e.length<h&&n.current&&n.current.length<h||n.current!==e&&(n.current=e,v({layoutSearchResource:E(d,()=>{P(e=>e+1)}),layoutSearchInput:e}),void 0!==n.current&&(0,B.BI)({key:"searchInput",input:e}))},b);t.current=J;const Y=(0,l.useCallback)(()=>{const t=e.current?.value.trim();t&&0!==t.length?t.length>=h&&U(t,{shallow:!1}).then(()=>J(t)):U(null).then(()=>F(C(M)).then(()=>{J("")}))},[J,M,h,F,U]),G=(0,l.useCallback)(e=>{e?.preventDefault(),Y()},[Y]),q=o().debounce(()=>Y(),p),Q=(0,l.useCallback)(e=>{D.current=e},[]);return(0,a.jsx)(I.c,{layout:c,navInFlow:!0,children:(0,a.jsxs)("div",{className:V.Uk,children:[(0,a.jsx)(T.A,{name:K("search.breadcrumbs"),routeName:"search"}),(0,a.jsx)(f.o,{className:"sr-only",component:"h1",children:K("search.breadcrumbs")}),(0,a.jsxs)(O,{className:m.kL,inputRef:e,onSubmit:G,onInputChange:q,inputInitialValue:X||void 0,onClear:()=>{U(null).then(()=>F(C(M)).then(()=>{J(""),e?.current&&(0,B.BI)({key:"searchTermDeleted",input:X})}))},clearButtonLabel:K("search.clearButton"),inputLabel:K("search.a11y.classicInputLabel",{count:h}),placeholder:K("search.search"),setInputCallback:Q,isLoading:y?.isPending(),children:[(0,a.jsx)(w.Y,{fallback:(0,a.jsx)(_,{resource:null,input:"",minQueryLength:h}),children:(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)("span",{children:K("layout.loading")}
1),children:(0,a.jsx)(_,{input:A,resource:y,minQueryLength:h})})}),H?.length?(0,a.jsx)(j,{"aria-label":"",translations:{scrollLeftLabel:K("global.goToNextSlide"),scrollRightLabel:K("global.goToNextSlide")},children:H.map(e=>{return(0,a.jsx)(x,{kind:e.type,selected:(t=e.scope.param,n=M,!!n[`facet[${t}]`]),label:e.title,translations:{removeLabel:""},onClick:()=>(e=>{const{id:t,type:n}=c.entity;F(((e,t)=>{const n=`facet[${e}]`,a=!!t[n];return{...t,[n]:!a}})(e,M)).then(()=>d((({entityId:e,entityType:t})=>n=>{const a=new URL(globalThis.location.href);return(0,N.HC)({pathname:a.pathname,search:a.search}),n((0,L.Xp)({entityType:t,entityId:e,withFacets:!0}))})({entityId:t,entityType:n})))})(e.scope.param)},e.title);var t,n})}):null]}),(0,a.jsx)(S._,{blocks:c?.blocks,layoutTheme:c?.theme,entityType:u.O5.frontspace,entityId:u.lx.search,transitionId:o().identity})]})})}},40269(e,t,n){var a=n(3495),l=n(66751),s=n(70263),r=n(888);const c=({name:e,routeName:t})=>{const n=[{name:"Home",url:s.eK.getAbsolute("home")},{name:e,url:s.eK.getAbsolute(t)}];return(0,a.jsx)(r.A,{breadcrumbs:n})},o=(0,l.memo)(c);n.d(t,["A",0,o])},18292(e,t,n){var a=n(94005);n.d(t,["Y",0,({fallback:e,children:t})=>(0,a.qK)()?t:e])}}]);
2//# sourceMappingURL=sourcemaps/server-side-search-6f7996c50d11d308.bundle.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.