PageSourceSearch

https://www.eu-gleichbehandlungsstelle.de/_assets/9da1c2a6d746389c…/public/chunks/interactive-map-CRz4alwt.js

js eu-gleichbehandlungsstelle.de collected 2026-10-03 23:54:10 UTC 69,898 bytes, 762 lines download raw bytes

1import{i as e,b as t,D as i,A as s,e as a,_ as r}from"./pp-accordion-CA6w9In6.js";import{o as n}from"./pp-social-media-newsroom-XnZulFRf.js";import{o}from"./pp-facet-dropdown-FY1eeaHH.js";import{u as l,s as p}from"./pp-process-CNG5NvVa.js";const c="pagination:changed-page",d="sort:change";class h extends e{async updated(e){super.updated(e),await new Promise(e=>{setTimeout(()=>e())}),this.classList.add("opacity-100","min-h-[initial]","aspect-auto")}createRenderRoot(){return this}}function u(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function m(e){return function t(i){return 0===arguments.length||u(i)?t:e.apply(this,arguments)}}function g(e){return function t(i,s){switch(arguments.length){case 0:return t;case 1:return u(i)?t:m(function(t){return e(i,t)});default:return u(i)&&u(s)?t:u(i)?m(function(t){return e(t,s)}):u(s)?m(function(t){return e(i,t)}):e(i,s)}}}var f=g(function(e,t){return null!=t&&t.constructor===e||t instanceof e});const b=e=>{if("TEMPLATE"===e.nodeName){const t=Array.from(e.content.cloneNode(!0).children);if(!(t?.length>1||e.dataset.slot.startsWith("html-collection"))){if(1===t?.length)return t[0].dataset.slot=e.dataset.slot,t[0];t.dataset.slot=e.dataset.slot}return e.parentElement&&e.parentElement.removeChild(e),t}return e},v=(e,t)=>f(Array,t)?t.reduce((t,i)=>{const s=`:scope > [data-slot="${i}"]`;let a=[...e.querySelectorAll(s)];return 1===a.length?a=a[0]:a.length||(a=null),a?(a=Array.isArray(a)?a.map(e=>b(e)):b(a),{...t,[i]:a}):t},{}):[...e.children].map(e=>b(e));let y=0;function _(e,i,s){switch(e){case 1:return t`<h1 class="${o(s)}">${i}</h1>`;case 2:return t`<h2 class="${o(s)}">${i}</h2>`;case 3:return t`<h3 class="${o(s)}">${i}</h3>`;case 4:return t`<h4 class="${o(s)}">${i}</h4>`;case 5:return t`<h5 class="${o(s)}">${i}</h5>`;case 6:return t`<h6 class="${o(s)}">${i}</h6>`;default:throw new Error("Please provide a valid headline level. Range from 1 - 6.")}}customElements.define("pp-dynamic-pagination",class extends e{static get properties(){return{currentPage:{type:Number,reflect:!0,attribute:"current-page"},totalResults:{type:Number,reflect:!0,attribute:"total-results"},pageSize:{type:Number,attribute:"page-size"},pagesBeginning:{type:Number,attribute:"pages-beginning"},pagesBeforeCurrent:{type:Number,attribute:"pages-before-current"},pagesAfterCurrent:{type:Number,attribute:"pages-after-current"},pagesEnd:{type:Number,attribute:"pages-end"},showEntries:{type:Boolean,attribute:"show-entries"},events:{type:Boolean},textPrevButtonTitle:{type:String,attribute:"text-prev-button-title"},textNextButtonTitle:{type:String,attribute:"text-next-button-title"},textSeparator:{type:String,attribute:"text-separator"},headlineText:{type:String,attribute:"headline-text"},headlineLevel:{type:Number,attribute:"headline-level"},headlineSrOnly:{type:Boolean,attribute:"headline-sr-only"}}}constructor(){super(),this.events=!1,this.pageSize=10,this.pagesBeginning=1,this.pagesBeforeCurrent=1,this.pagesAfterCurrent=1,this.pagesEnd=1,this.showEntries=!1,this.textPrevButtonTitle="Vorherige Seite",this.textNextButtonTitle="Nächste Seite",this.textSeparator="…",this.headlineLevel=2,this.headlineSrOnly=!1,this.currentPage=1,this.totalResults=1}get totalPages(){return Math.ceil(this.totalResults/Math.max(this.pageSize,1))}changePage=e=>{const t=e?.target?.dataset?.pagination??1;switch(t){case"next":this.currentPage=Math.min(this.currentPage+1,this.totalPages);break;case"prev":this.currentPage=Math.max(this.currentPage-1,1);break;default:this.currentPage=parseInt(t,10)||1}this.events&&this.dispatchEvent(new CustomEvent(c,{detail:{page:this.currentPage},bubbles:!0}))};getLabelForPage(e){if(!this.showEntries)return`${e}`;const t=(e-1)*this.pageSize+1,i=Math.min(e*this.pageSize,this.totalResults);return t!==i?`${t} - ${i}`:`${i}`}generatePageNumbers(){const e=[];return e.push(Array(Math.min(Math.max(this.pagesBeginning,0),this.currentPage-1)).fill().map((e,t)=>t+1)),e.push(Array(Math.max(this.pagesBeforeCurrent,0)).fill().map((e,t)=>this.currentPage-1-t)),e.push(this.currentPage),e.push(Array(Math.max(this.pagesAfterCurrent,0)).fill().map((e,t)=>this.currentPage+1+t)),e.push(Array(Math.min(Math.max(this.pagesEnd,0),this.totalPages-this.currentPage)).fill().map((e,t)=>this.totalPages-t)),e.flat().filter((e,t,i)=>e>0&&e<=this.totalPages&&i.indexOf(e)===t).sort((e,t)=>
1e-t)}get headline(){const e=this.headlineSrOnly?"dynamic-pagination__headline--sr-only":"dynamic-pagination__headline";return this.headlineText?_(this.headlineLevel,this.headlineText,e):s}renderButton(e,i,s){return t`
2            <button
3                type="button"
4                class="dynamic-pagination__button ${s}"
5                data-pagination=${i}
6                @click=${this.changePage}
7            >
8                ${e||i}
9            </button>           
10        `}get pageEntries(){const e=this.generatePageNumbers(),i=[],s=t`
11            <span class="dynamic-pagination__separator">
12                ${this.textSeparator}
13            </span>`;let a=0;return e.forEach(e=>{e>a+1&&i.push(s),e===this.currentPage?i.push(t`
14                    <span class="dynamic-pagination__current">
15                        ${this.getLabelForPage(e)}
16                    </span>
17                `):i.push(this.renderButton(this.getLabelForPage(e),e)),a=e}),e[e.length-1]<this.totalPages&&i.push(s),i}get backButton(){return 1===this.currentPage?s:this.renderButton(this.textPrevButtonTitle,"prev","dynamic-pagination__button--prev")}get nextButton(){return this.currentPage===this.totalPages?s:this.renderButton(this.textNextButtonTitle,"next","dynamic-pagination__button--next")}get pagesList(){const e=this.pageEntries.map(e=>t`
18            <li>${e}</li>
19        `);return e.length?t`
20                <ol class="dynamic-pagination__list">
21                    ${e}
22                </ol>
23            `:s}get cssStyles(){return t`
24            <style>
25                .dynamic-pagination {
26                    font-family: sans-serif;
27                    font-size: 1rem;
28                    margin: 2rem 0 0;
29                }
30
31                .dynamic-pagination__headline {
32                    font-size: 1rem;
33                    margin: 0 0 1rem;
34                }
35
36                .dynamic-pagination__headline--sr-only {
37                    border-width: 0;
38                    clip: rect(0, 0, 0, 0);
39                    height: 1px;
40                    margin: -1px;
41                    overflow: hidden;
42                    padding: 0;
43                    position: absolute;
44                    white-space: nowrap;
45                    width: 1px;
46                }
47
48                .dynamic-pagination__nav {
49                    align-items: flex-start;
50                    display: flex;
51                    font-size: 0.9em;
52                    gap: 1rem;
53                    justify-content: center;
54                }
55
56                .dynamic-pagination__list {
57                    align-items: center;
58                    display: flex;
59                    flex-wrap: wrap;
60                    gap: 0.5rem 1rem;
61                    justify-content: center;
62                    list-style-type: none;
63                    margin: 0;
64                    padding: 0;
65                }
66
67                .dynamic-pagination__button {
68                    background: none;
69                    border: 1px solid;
70                    cursor: pointer;
71                    font-size: 1em;
72                    min-height: 44px;
73                    min-width: 44px;
74                    padding: 0.5rem;
75                    text-transform: uppercase;
76                }
77
78                .dynamic-pagination__button:focus,
79                .dynamic-pagination__button:hover {
80                    text-decoration: underline;
81                }
82
83                .dynamic-pagination__current {
84                    border-bottom: 2px solid;
85                    font-weight: bold;
86                }
87            </style>
88        `}render(){return t`
89            ${this.cssStyles}            
90            <div class="dynamic-pagination">
91                ${this.headline}
92                <div class="dynamic-pagination__nav">
93                    ${this.backButton}
94                    ${this.pagesList}
95                    ${this.nextButton}
96                </div>
97            </div>
98        `}createRenderRoot(){return this}});class x extends h{constructor(){super(),this.classList.add("block")}}const w="change:filter",$="change:search",k="change:sort",S="update:results",L="update:filters",C="update:settings",E="active:filters",B="request:data",P="request:filters",F="request:results",A="request:settings",I="remove:filter",T="set:filter",z="set:sort",N="api:error:data",O="api:start:search",R="api:stop:search",M="api:error:search",D="|";class j{namespace="";constructor(e){e&&(this.namespace=e)}
98dispatch(e,t={},i={}){window.dispatchEvent(new CustomEvent(`${this.namespace}${D}${e}`,{...i,detail:t}))}on(e,t){window.addEventListener(`${this.namespace}${D}${e}`,t)}off(e,t){window.removeEventListener(`${this.namespace}${D}${e}`,t)}static getNamespaceFromEvent(e){const t=e.type.indexOf(D)||-1;return-1===t?"":e.type.substring(0,t)}}class q extends x{static get properties(){return{checked:{type:Boolean,reflect:!0},items:{type:Array,reflect:!0},href:{type:String},optionValue:{type:String,attribute:"option-value"},optionFilter:{type:String,attribute:"option-filter"},optionGroup:{type:String,attribute:"option-group"},isButton:{type:Boolean,attribute:"is-button"},namespace:{type:String,attribute:"namespace"},singleChoice:{type:Boolean,attribute:"single-choice"}}}eventBus;constructor(){super(),this.checked=!1,this.isButton=!1,this.singleChoice=!1}get facetItemClasses(){return{"u-icon-checkmark--active":this.checked,"qs-facet-dropdown-item__link":!this.isButton,"qs-facet-dropdown-item__button":this.isButton}}connectedCallback(){super.connectedCallback(),this.eventBus=new j(this.namespace),this.items=this.items||[...this.childNodes],this.classList.add("qs-facet-dropdown-item"),this.isButton&&this.singleChoice&&this.eventBus.on(w,this.deselectSelfOnGroupChange)}deselectSelfOnGroupChange=e=>{if(e?.detail?.group===this.optionGroup&&e?.detail?.entry!==this.optionValue){const e={group:this.optionGroup,entry:this.optionValue,filter:this.optionFilter};this.eventBus.dispatch(I,e),this.checked=!1}};toggleFilter(){if(this.isButton){this.checked=!this.checked;const e={group:this.optionGroup,entry:this.optionValue};this.optionFilter&&(e.filter=this.optionFilter),this.eventBus.dispatch(w,e)}}static renderSelf({id:e,label:i,filterId:s,groupId:a,isSelected:r,namespace:n,isButton:o,singleChoice:l}){return t`
99            <pp-namespaced-map-facet-dropdown-item option-value="${e}"
100                                    option-filter="${s}"
101                                    option-group="${a}"
102                                    data-slot="pp-namespaced-map-facet-dropdown-item"
103                                    ?checked="${r}"
104                                    namespace="${n}"
105                                    ?is-button="${o}"
106                                    .singleChoice="${l}">
107                                    
108                ${i}
109            </pp-namespaced-map-facet-dropdown-item>
110        `}get button(){return t`
111            <button
112                class="block ${a(this.facetItemClasses)} "
113                role="option"
114                aria-selected="${this.checked}"
115                @click="${this.toggleFilter}"
116            >
117                ${this.items}
118            </button>
119        `}get link(){return t`
120            <a
121                href="${this.href}"
122                class="block ${a(this.facetItemClasses)}"
123                role="option"
124                aria-selected="${this.checked}"
125                @click="${this.toggleFilter}"
126            >
127                ${this.items}
128            </a>
129        `}render(){return this.isButton?this.button:this.link}}customElements.define("pp-namespaced-map-facet-dropdown-item",q);class U extends h{constructor(){super(),this.classList.add("flex")}}class H extends U{dropdownId;static get properties(){return{text:{type:String,attribute:"text"},dynamicWidth:{type:Boolean,attribute:"dynamic-width"},namespace:{type:String,attribute:"namespace"},expanded:{type:Boolean,reflect:!0}}}constructor(){super(),this.dynamicWidth=!1,this.dropdownId="dropdown-"+(y+=1,`generated-id-${y}`),this.classList.add("dropdown"),this.classList.add("btn-group"),this.classList.add("qs-facet-dropdown"),this._children=v(this,["pp-namespaced-map-facet-dropdown-item"])}connectedCallback(){super.connectedCallback(),this.dynamicWidth||this.classList.add("w-full"),this._children["pp-namespaced-map-facet-dropdown-item"]?.length||(this._children=v(this,["pp-namespaced-map-facet-dropdown-item"]))}firstUpdated(){this.addEventListener("show.bs.dropdown",()=>{this.expanded=!0}),this.addEventListener("hide.bs.dropdown",()=>{this.expanded=!1})}get buttonClasses(){return{"u-icon-chevron-up":this.expanded,"u-icon-chevron-down":!this.expanded}}get dropdownClasses(){return{showed:this.expanded}}get dropdownItem(){return Array.isArray(this._children["pp-namespaced-map-facet-dropdown-item"])?this._children["pp-namespaced-map-facet-dropdown-item"]?.map(e=>t`<li class="dropdown-item">${e}</li>`):t`<li>${this._children["pp-namespaced-map-facet-dropdown-item"]}</li>`}static renderSelf({entries:e,label:i,filterId:s,groupId:a,namespace:r,isButton:n,singleChoice:o}){return t`
130            <pp-namespaced-map-facet-dropdown data-slot="pp-namespaced-map-facet-dropdown" text="${i}" namespace="${r}">
131                ${e.map(e=>q.renderSelf({...e,filterId:s,groupId:a,namespace:r,isButton:n,singleChoice:o}))}
132            </pp-namespaced-map-facet-dropdown>`}render(){return t`
133            <style>
134                pp-namespaced-map-facet-dropdown .qs-facet-dropdown__button,
135                pp-namespaced-map-facet-dropdown .qs-facet-dropdown__link {
136                    width: ${this.dynamicWidth?"auto":"100%"};
137                    border: var(--pp-namespaced-map-facet-dropdown-border-width) solid var(--pp-namespaced-map-facet-dropdown-border-color);
138                    padding: var(--pp-namespaced-map-facet-dropdown-padding);
139                    background-position: 95% center;
140                    background-color: var(--pp-namespaced-map-facet-dropdown-background-color);
141                    color: var(--pp-namespaced-map-facet-dropdown-text-color);
142                    font-size: var(--pp-namespaced-map-facet-dropdown-text-size);
143                    font-weight: var(--pp-namespaced-map-facet-dropdown-text-weight);
144                    cursor: pointer;
145                }
146                pp-namespaced-map-facet-dropdown .qs-facet-dropdown__list {
147                    width: ${this.dynamicWidth?"auto":"100%"};
148                }
149                pp-namespaced-map-facet-dropdown-item button,
150                pp-namespaced-map-facet-dropdown-item a{
151                    /* Transition */
152                    transition-property: background-color;
153                    transition-duration: 150ms;
154                    
155                    /* Background */
156                    background-position: 95% center !important;
157                    background-color: var(--pp-namespaced-map-facet-dropdown-item-background-color) !important;
158                    
159                    /* Other properties */
160                    z-index: 10;
161                    width: 100%;
162                    display: block;
163                    padding: var(--pp-namespaced-map-facet-dropdown-item-padding);
164                    padding-right: var(--pp-namespaced-map-facet-dropdown-item-padding-right);
165                    border: 0;
166                    font-size: var(--pp-namespaced-map-facet-dropdown-item-text-size);
167                    color: var(--pp-namespaced-map-facet-dropdown-item-text-color);
168                    text-align: left;
169                    border-color: var(--pp-namespaced-map-facet-dropdown-item-border-color);
170                    
171                    /* Box model and typography */
172                    box-sizing: border-box;
173                    font-weight: var(--pp-namespaced-map-facet-dropdown-item-text-weight);
174                }
175                pp-namespaced-map-facet-dropdown-item button:hover,
176                pp-namespaced-map-facet-dropdown-item a:hover,
177                pp-namespaced-map-facet-dropdown-item button:focus,
178                pp-namespaced-map-facet-dropdown-item a:focus {
179                    background-color: var(--pp-namespaced-map-facet-dropdown-item-background-color-hover) !important;
180                    border-color: var(--pp-namespaced-map-facet-dropdown-item-border-color-hover) !important;
181                    cursor: pointer;
182                }
183                pp-namespaced-map-facet-dropdown .dropdown-item {
184                    padding: 0;
185                }
186            </style>
187            <button
188                id="${this.dropdownId}-button"
189                name="${this.dropdownId}-button"
190                class="qs-facet-dropdown__button ${a(this.buttonClasses)}"
191                type="button"
192                data-bs-toggle="dropdown"
193                role="combobox"
194                aria-controls="${this.dropdownId}"
195                aria-haspopup="listbox"
196                data-bs-display="static"
197                aria-expanded="${this.expanded?"true":"false"}"
198            >
199                ${this.text}
200            </button>
201            <ul id="${this.dropdownId}"
202                class="qs-facet-dropdown__list dropdown-menu ${a(this.dropdownClasses)}"
203                role="listbox"
204                aria-labelledby="${this.dropdownId}-button"
205                aria-multiselectable="true">
206                ${this.dropdownItem}
207            </ul>
208        `}}customElements.define("pp-namespaced-map-facet-dropdown",H);customElements.define("pp-map-item-details",class extends e{static get properties(){return{itemId:{type:String,attribute:"item-id"},titleText:{type:String,attribute:"title-text"},titleLevel:{type:Number,attribute:"title-level"},subtitleText:{type:String,attribute:"subtitle-text"},imgSrc:{type:String,attribute:"img-src"},imgAlt:{type:String,attribute:"img-alt"},imgPosition:{type:String,attribute:"img-position"},addressData:{type:Object,attribute:"address-data"},linksData:{type:Array,attribute:"links-data"},locationText:{type:String,attribute:"location-text"},topicLabel:{type:String,attribute:"topic-label"},tagsData:{type:Array,attribute:"tags-data"},titleUrl:{type:String,attribute:"title-url"},clickable:{type:Boolean}}}#e=v(this)??[];constructor(){super(),this.titleLevel=2,this.imgAlt="",this.imgPosition="left",this.clickable=!1}get headline(){if(!this.titleText)return s;const e=_(this.titleLevel,this.titleText,"map-item-details__title");return this.titleUrl?t`
209                <a href="${this.titleUrl}" class="map-item-details__title-link">
210                    ${e}
211                </a>`:t`
212                <div>
213                    ${e}
214                </div>`}get subtitle(){return this.subtitleText?t`
215                <div class="map-item-details__subtitle">
216                    ${this.subtitleText}
217                </div>
218            `:s}get location(){return this.locationText?t`
219                <div class="map-item-details__location">
220                    ${this.locationText}
221                </div>
222            `:s}get address(){if(!this.addressData||!Object.keys(this.addressData).length)return s;const e=["co","street","city","state","country"].map(e=>Object.prototype.hasOwnProperty.call(this.addressData,e)?t`<span>${this.addressData[e]}</span>`:s);return e?.length?t`
223                <address class="map-item-details__address">
224                    ${e}
225                </address>
226            `:s}renderLink(e){return e?.src?t`
227                <a
228                    class=${`map-item-details__link map-item-details__link--${e.type}`}
229                    href="${{email:"mailto:",phone:"tel:"}[e.type]??""}${e.src}" 
230                    rel="noopener noreferrer"
231                >
232                    ${e.name??e.src}
233                </a>
234            `:s}get links(){const e=this.linksData?.filter(e=>"email"!==e.type);return e?.length?t`
235            <dl class="map-item-details__links">
236                ${e.map(e=>t`
237                    <dt class="map-item-details__link-label">${e.label}:</dt>
238                    <dd class="map-item-details__link">${this.renderLink(e)}</dd>
239                `)}
240            </dl>
241        `:s}get details(){return this.#e?.length?t`
242                <div class="map-item-details__details">
243                    ${this.#e}
244                </div>
245            `:s}get topicLabelTemplate(){return this.topicLabel?t`
246                <span class="map-item-details__topic_label">
247                    ${this.topicLabel}
248                </span>
249            `:s}get tags(){return this.tagsData?.length?t`
250                <ul class="map-item-details__tags">
251                    ${this.tagsData.map(e=>t`
252                        <li class="map-item-details__tag">
253                            ${e.label}
254                        </li>
255                    `)}
256                </ul>
257            `:s}get imagePositionClass(){return{"map-item-details__image--left":"left"===this.imgPosition}}get image(){return this.imgSrc?t`
258                <img
259                    class="map-item-details__image${a(this.imagePositionClass)}"
260                    src="${this.imgSrc}"
261                    alt="${this.imgAlt}"
262                    loading="lazy"
263                />
264            `:s}get cssStyles(){return t`
265            <style>
266                .map-item-details {
267                    align-items: flex-start;
268                    display: flex;
269                    font-family: sans-serif;
270                    font-size: 1rem;
271                    gap: 1rem;
272                }
273                
274                .map-item-details__content {
275                    align-items: flex-start;
276                    display: flex;
277                    flex-direction: column;
278                    flex-grow: 1;
279                    gap: 1rem;
280                }
281
282                .map-item-details__title {
283                    font-size: 1.2em;
284                    margin: 0;
285                }
286
287                .map-item-details__subtitle {
288                    text-transform: uppercase;
289                }
290
291                .map-item-details__location {
292                    font-style: italic;
293                }
294
295                .map-item-details__address {
296                    display: flex;
297                    flex-direction: column;
298                    font-style: italic;
299                }
300                
301                .map-item-details__links {
302                    display: grid;
303                    grid-column-gap: 1rem;
304                    grid-template-columns: auto 1fr;
305                    margin: 0;
306                }
307
308                .map-item-details__link-label {
309                    font-weight: bold;
310                }
311
312                .map-item-details__link {
313                    margin: 0;
314                }
315                
316                .map-item-details__tags {
317                    display: flex;
318                    flex-wrap: wrap;
319                    gap: 1rem;
320                    list-style-type: none;
321                    padding-left: 0;
322                }
323                
324                .map-item-details__tag {
325                    border: 1px solid;
326                    border-radius: 1rem;
327                    font-size: 0.8em;
328                    padding: 0.5rem;
329                    text-transform: uppercase;
330                }
331
332                .map-item-details__image {
333                    width: 12rem;
334                }
335
336                .map-item-details__image--left {
337                    order: 0;
338                }
339
340                .map-item-details:has(.map-item-details__image--left) .map-item-details__content {
341                    order: 1;
342                }
343            </style>
344        `}get articleClasses(){return{"cursor-pointer":this.titleUrl&&this.clickable,"map-item-details--clickable":this.titleUrl&&this.clickable}}render(){return t`
345            ${this.cssStyles}
346            <article 
347                id=${o(this.itemId)}
348                class="map-item-details ${a(this.articleClasses)}"
349                @click=${this.clickable?e=>((e,t)=>{if(!e||!t)return!1;if("a"!==e.target?.tagName?.toLowerCase()){const i=t.querySelector("a[href]");if(i)return e.preventDefault(),e.stopPropagation(),i.click(),!0}return!1})(e,this):void 0}
350            >
351                <div class="map-item-details__content">
352                    <!-- adjust the order via flexbox 'order' property -->
353                    ${this.headline}
354                    ${this.subtitle}
355                    ${this.location}
356                    ${this.address}
357                    ${this.links}
358                    ${this.details}
359                    <div class="map-item-details__container"> 
360                        ${this.topicLabelTemplate}
361                        ${this.tags}
362                    </div>
363                </div>
364                ${this.image}
365            </article>
366        `}createRenderRoot(){return this}});const Z="some";class G{activeFilters={};structure={};filter(e){return Object.keys(this.activeFilters).length?e.filter(e=>this.evaluateGroups(e)):e}evaluateGroups(e){return Object.keys(this.activeFilters)[this.structure.logic||Z](t=>this.evaluateFilters(e,t))}evaluateFilters(e,t){const i=Object.keys(this.activeFilters[t]);if(!i.length)return!0;return i[this.structure.groups[t]?.logic||Z](i=>
366this.evaluateEntries(e,t,i))}evaluateEntries(e,t,i){if(!this.activeFilters[t][i]?.length)return!0;return this.activeFilters[t][i][this.structure.groups[t]?.filters[i]?.logic||Z](t=>e.properties?.filteredBy?.includes(t))}changeFilter({group:e,filter:t,entry:i}){const s=this.findActiveFilter(e,t,i);s>=0?this.deleteActiveFilterEntry(e,t,s):(this.activeFilters[e]=this.activeFilters[e]||{},this.activeFilters[e][t]=this.activeFilters[e][t]||[],this.activeFilters[e][t].push(i))}removeFilter({group:e,filter:t,entry:i}){this.deleteActiveFilterEntry(e,t,this.findActiveFilter(e,t,i))}findActiveFilter(e,t,i){return this.activeFilters?.[e]?.[t]?.indexOf?.(i)}deleteActiveFilterEntry(e,t,i){i>=0&&(this.activeFilters[e][t].splice(i,1),0===this.activeFilters[e][t].length&&(delete this.activeFilters[e][t],0===Object.keys(this.activeFilters[e]).length&&delete this.activeFilters[e]))}setFilter(e){this.activeFilters={...e}}setLogic(e){this.structure={logic:"and"===e.logic?"every":"some",groups:{}},e.groups.forEach(e=>{this.structure.groups[e.id]={logic:"and"===e?.logic?"every":"some",filters:{}},e.filters.forEach(t=>{this.structure.groups[e.id].filters[t.id]={logic:"and"===t?.logic?"every":"some"}})})}}const V={string:(e,t,i)=>`${e[i]}`.localeCompare(`${t[i]}`),number:(e,t,i)=>+e[i]-+t[i],date:(e,t,i)=>{const s=e[i],a=t[i],r=e=>{if("string"!=typeof e)return null;if(e.includes("-")){const t=e.split("-");if(3===t.length&&4===t[0].length)return new Date(e)}if(e.includes(".")){const t=e.split(".");if(3===t.length&&4===t[2].length)return new Date(`${t[2]}-${t[1]}-${t[0]}`)}return null};try{const e=r(s),t=r(a);return e||t?e<t?-1:e>t?1:0:0}catch(n){return 0}}};class W{currentSort=null;sort(e){if(this.currentSort){const{type:t,ascending:i,property:s}=this.currentSort;if("date"===t){const a=e.filter(e=>{const t=e.properties.sortBy[s];return null!=t&&""!==t}),r=e.filter(e=>{const t=e.properties.sortBy[s];return null==t||""===t});return a.sort((e,a)=>V[t](e.properties.sortBy,a.properties.sortBy,s)*(i?1:-1)),[...a,...r]}return e.sort((e,a)=>V[t](e.properties.sortBy,a.properties.sortBy,s)*(i?1:-1))}return e}setSort(e){"object"==typeof e&&(this.currentSort={property:e.property||"",ascending:!!e.ascending,type:e.type||"string"})}}const J="conn_mgmt:",K={};function X(e){let t=e.lastResult.results;return e.filterAlgorithm&&(t=e.filterAlgorithm.filter(t)),e.sortAlgorithm?e.sortAlgorithm.sort(t):t}function Q(e){const t=K[j.getNamespaceFromEvent(e)],i={...e?.detail||{}};if(t&&t.api.search){const e=new URLSearchParams(i),s=t.api.search.indexOf("?")>=0?`${t.api.search}&${e}`:`${t.api.search}?${e}`;t.events.dispatch(O,i),fetch(s).then(e=>{if(!e.ok)throw new Error(`${e.status}`);return e.json()}).then(e=>{let s=!1,a=!1,r=!1;if(e.results&&(t.lastResult.results=e.results||[],s=!0),e.filters&&(t.lastResult.filters=e.filters||{},a=!0,t.filterAlgorithm.setLogic(e.filters)),e.settings&&(t.lastResult.settings=e.settings||{},r=!0),r&&t.events.dispatch(C,t.lastResult.settings),a&&t.events.dispatch(L,t.lastResult.filters),s){const e=X(t);e._source="search",t.events.dispatch(S,e)}t.events.dispatch(R,i)}).catch(e=>{t.events.dispatch(M,{searchParameters:i,error:e})})}}function Y(e){const t=K[j.getNamespaceFromEvent(e)],i={...e?.detail||{}};if(t&&t.api.data&&Array.isArray(e?.detail?.ids)&&"function"==typeof e?.detail?.callback){const s=e.detail.ids.slice(0,10),a=function(e,t){const{cache:i}=e,s={found:[],missing:[]};return i?t.forEach(e=>{i.has(`${e}`)?s.found.push(i.get(`${e}`)):s.missing.push(`${e}`)}):s.missing=[...t],s}(t,s);if(a.missing.length>0){const r=[],n=new URLSearchParams({[t.api.dataParam]:a.missing}),o=t.api.data.indexOf("?")>=0?`${t.api.data}&${n}`:`${t.api.data}?${n}`;t.events.dispatch("api:start:data",i),fetch(o).then(e=>{if(!e.ok)throw new Error(`${e.status}`);return e.json()}).then(n=>{Array.isArray(n)&&(n.forEach(e=>{e.links?.forEach(e=>{"www"!==e.type||e.src?.startsWith("http")||(e.src=`https://${e.src}`)})}),function(e,t){const{cache:i}=e;i&&(t.forEach(e=>{e.id&&i.set(`${e.id}`,e)}),sessionStorage.setItem(`${J}${e.id}`,JSON.stringify(i)))}(t,n),s.forEach(e=>{const t=n.find(t=>
366t.id===e)||a.found.find(t=>t.id===e);t&&r.push(t)})),e.detail.callback(r),t.events.dispatch("api:stop:data",i)}).catch(e=>{t.events.dispatch(N,{searchParameters:i,error:e})})}else e.detail.callback(a.found)}}function ee(e,t){const i=K[j.getNamespaceFromEvent(e)];if(i&&i.filterAlgorithm){t?i.filterAlgorithm.removeFilter(e.detail):i.filterAlgorithm.changeFilter(e.detail);const s=X(i);s._source="filter",i.events.dispatch(E,i.filterAlgorithm.activeFilters),i.events.dispatch(S,s)}}function te(e){ee(e,!1)}function ie(e){ee(e,!0)}function se(e){const t=K[j.getNamespaceFromEvent(e)];t&&t.filterAlgorithm&&(t.filterAlgorithm.setFilter(e.detail),t.events.dispatch(E,t.filterAlgorithm.activeFilters))}function ae(e){const t=K[j.getNamespaceFromEvent(e)];t&&t.sortAlgorithm&&t.sortAlgorithm.setSort(e.detail)}function re(e){ae(e);const t=K[j.getNamespaceFromEvent(e)],i=X(t);i._source="sort",t.events.dispatch(S,i)}function ne(e){const t=K[j.getNamespaceFromEvent(e)];if("function"==typeof e?.detail?.callback&&t){const i=X(t);i._source="search",e.detail.callback(i)}}function oe(e){const t=j.getNamespaceFromEvent(e);"function"==typeof e?.detail?.callback&&K[t]&&e.detail.callback(K[t].lastResult?.filters)}function le(e){const t=j.getNamespaceFromEvent(e);"function"==typeof e?.detail?.callback&&K[t]&&e.detail.callback(K[t].lastResult?.settings)}const pe={connect:function(e,t){if("string"!=typeof e||K[e])return!1;const{searchEndpoint:i,dataEndpoint:s,dataParam:a,disableCache:r}=t;let n=null;if(!r)try{n=new Map(Object.entries(JSON.parse(sessionStorage.getItem(`${J}${e}`))))}catch(l){n=new Map}var o;return K[e]={id:e,api:{search:i,data:s,dataParam:a||"cms_ids"},events:new j(e),lastResult:{results:[],filters:{},settings:{}},filterAlgorithm:new G,sortAlgorithm:new W,cache:n},(o=K[e]).events.on($,Q),o.events.on(w,te),o.events.on(I,ie),o.events.on(T,se),o.events.on(k,re),o.events.on(z,ae),o.events.on(B,Y),o.events.on(F,ne),o.events.on(P,oe),o.events.on(A,le),!0},disconnect:function(e){return!!K[e]&&((t=K[e]).events.off($,Q),t.events.off(w,te),t.events.off(I,ie),t.events.off(T,se),t.events.off(k,re),t.events.off(z,ae),t.events.off(B,Y),t.events.off(F,ne),t.events.off(P,oe),t.events.off(A,le),delete K[e],!0);var t}};customElements.define("pp-namespaced-search",class extends x{static get properties(){return{namespace:{type:String},searchEndpoint:{type:String,attribute:"search-endpoint"},dataEndpoint:{type:String,attribute:"data-endpoint"},searchEvent:{type:String,attribute:"search-event"}}}constructor(){super(),this.searchEvent="submit",this._children=v(this),this.eventBus=null,this.addEventListener(this.searchEvent,this.dispatchSearchRequestEvent)}dispatchSearchRequestEvent(e){const t=e?.detail??Object.fromEntries(new FormData(e?.target))??{};"submit"===e?.type&&e.preventDefault(),this.eventBus.dispatch($,t)}firstUpdated(){this.eventBus=new j(this.namespace),this.searchEndpoint&&this.dataEndpoint&&(pe.connect(this.namespace,{searchEndpoint:this.searchEndpoint,dataEndpoint:this.dataEndpoint}),this.dispatchSearchRequestEvent())}render(){return t`
367            ${this._children??s}
368        `}});customElements.define("pp-spinner",class extends x{static get properties(){return{label:{type:String}}}constructor(){super(),this.classList.add("qs-spinner")}render(){return t`
369            <style>
370                pp-spinner {
371                    min-height: auto;
372                    opacity: 1;
373                    aspect-ratio: auto;
374                    display: block;
375                    font-family: sans-serif;
376                }
377                pp-spinner .spinner-wrapper{
378                    display: flex;
379                    align-items: center;
380                }
381                @keyframes pp-spinner-spin-paused {
382                    0% {
383                      transform:rotate(0deg)
384                    }
385                    to {
386                      transform:rotate(1turn)
387                    }
388                }
389                pp-spinner .spinner-element {
390                    width: 1.5rem;
391                    height: 1.5rem;
392                    border: 0.3rem solid;
393                    border-color: var(--pp-spinner-border-outer-color);
394                    border-right-color: var(--pp-spinner-border-inner-color);
395                    border-radius: 9999px;
396                    animation: pp-spinner-spin-paused 1s linear 5;
397                }
398                pp-spinner .spinner-label {
399                    font-size: 1.1rem;
400                    color: var(--pp-spinner-label-color);
401                    margin-left: 1.1rem;
402                }
403            </style>
404            <div class="spinner-wrapper">
405                <div class="spinner-element" role="status"></div>
406                <span class="spinner-label">${this.label}</span>
407            </div>
408        `}static renderSelf(e){return t`
409            <pp-spinner data-slot="pp-spinner" label="${e}">
410            </pp-spinner>
411        `}});class ce extends x{static get properties(){return{spinnerLabel:{type:String,attribute:"spinner-label"},namespace:{type:String},headlineLevel:{type:Number,attribute:"headline-level"},payloadId:{type:String,attribute:"payload-id"},imagePosition:{type:String,attribute:"image-position"},_content:{state:!0}}}eventBus;constructor(){super(),this.spinnerLabel="Lädt...",this.headlineLevel=3,this.imagePosition="left",this._content=this.spinner}firstUpdated(){this.eventBus=new j(this.namespace),this.eventBus.dispatch(B,{ids:[this.payloadId],callback:this.loadTooltipData})}loadTooltipData=e=>{const t=e.find(e=>this.payloadId===e.id);this._content=t?this.updateContent(t):this.spinner};updateContent=e=>{if(!e)return s;const{headlineLevel:i}=this,a=(e.images||[]).find(e=>"default"===e.type),r=e.content.map(e=>n(e));return t`
412            <pp-map-item-details
413                item-id=${o(e.id)}
414                title-text=${o(e.title)}
415                title-level=${i}
416                subtitle-text=${o(e.subtitle)}
417                location-text=${o(e.location?.label)}
418                img-src=${o(a?.src)}
419                img-alt=${o(a?.alt)}
420                .addressData=${e.address}
421                .linksData=${e.links}
422                topic-label=${e.topic_label}
423                .tagsData=${e.topics}
424                img-position=${o(this.imagePosition)}
425            >
426                <div>${r}</div>
427            </pp-map-item-details>
428        `};get spinner(){return t`
429            <pp-spinner data-slot="pp-spinner" label="${this.spinnerLabel}">
430            </pp-spinner>
431        `}render(){return this._content}static renderSelf(e,i){return t`
432            <pp-namespaced-tooltip 
433                data-slot="pp-namespaced-tooltip"
434                payload-id="${e}" 
435                namespace="${i.namespace}" 
436                headline-level="${i.headlineLevel}" 
437                image-position="${i.tooltipImagePosition}"
438                >
439            </pp-namespaced-tooltip>
440        `}}customElements.define("pp-namespaced-tooltip",ce);customElements.define("pp-namespaced-dynamic-list",class extends e{static get properties(){return{namespace:{type:String},headlineText:{type:String,attribute:"headline-text"},headlineLevel:{type:Number,attribute:"headline-level"},textResultsCount:{type:String,attribute:"text-results-count"},resultTextHeadlineLevel:{type:Number,attribute:"result-text-headline-level"},textNoResultsCount:{type:String,attribute:"text-no-results-count"},elementsPerPage:{type:Number,attribute:"elements-per-page"},imagePosition:{type:String,attribute:"image-position"},showTeaserContent:{type:Boolean,attribute:"show-teaser-content"},_loading:{type:Boolean,state:!0},_pageData:{type:Array,state:!0},clickable:{type:Boolean},initialSortingProperty:{type:String,attribute:"initial-sorting-property"}}}#e=v(this,["pp-dynamic-pagination","pp-namespaced-data-sort","pp-spinner"]);#t=new W;#i=1;#s=null;#a=[];#r=[];constructor(){super(),this._loading=!1,this.headlineLevel=2,this.elementsPerPage=10,this._pageData=[],this.initialSortingProperty="title"}connectedCallback(){let e;switch(super.connectedCallback(),this.initialSortingProperty){case"date":e="date";break;case"number":e="number";break;default:e="string"}this.#t.setSort({property:this.initialSortingProperty,ascending:!0,type:e})}async jumpToContent(){await this.updateComplete,window.scrollTo(0,this.offsetTop);const e=this.querySelector(".namespaced-dynamic-list__result");if(e)return e.setAttribute("tabindex","-1"),void e.focus();this.setAttribute("tabindex","-1"),this.focus()}requestPageData(e){const t=this.#a.slice((this.#i-1)*this.elementsPerPage,this.#i*this.elementsPerPage).map(e=>e.properties.id);t.length&&(this._loading=!0,this.#s.dispatch(B,{ids:t,callback:async t=>{await this.resetPageData(),this._loading=!1,this._pageData=t,e&&this.jumpToContent()}}))}resetPageData=async()=>{this._pageData=s,this.requestUpdate(),await this.updateComplete};sortResults(){return this.#t.sort([...this.#r])}updateResults=e=>{Array.isArray(e)?this.#r=e:Array.isArray(e?.detail)&&(this.#r=e.detail),this.#a=this.sortResults(),this.#i=1,this.#a.length||this.resetPageData(),this.#a.length&&this.requestPageData()};setCurrentPage=e=>{e?.detail?.page&&(this.#i=e.detail.page,this.requestPageData(!0))};changeSort=e=>{e?.detail&&(this.#t.setSort(e.detail),this.#a=this.sortResults(),this.#i=1,this.resetPageData(),this.#a.length&&this.requestPageData())};firstUpdated(){this.#s=new j(this.namespace),this.#s.on(S,this.updateResults),this.#s.on(k,this.changeSort),this.#s.dispatch(F,{callback:this.updateResults}),this.addEventListener(c,this.setCurrentPage),this.#s.on(O,()=>{this._loading=!0}),this.#s.on(M,()=>{this._loading=!1}),this.#s.on(N,()=>{this._loading=!1}),this.#s.on(R,()=>{this._loading=!1})}get headline(){return this.headlineText?_(this.headlineLevel,this.headlineText,"namespaced-dynamic-list__headline"):s}get spinner(){const e=this.#e["pp-spinner"];return e&&this._loading?e:s}get resultsCount(){if(!this.textResultsCount)return s;const e=this.#a.length,i=`${e} ${this.textResultsCount}`,a=this.textNoResultsCount??i,r=this.resultTextHeadlineLevel?_(this.resultTextHeadlineLevel,`${e?i:a}`,"namespaced-dynamic-list__results-count-headline"):`${e?i:a}`;return t`
441            <div class="namespaced-dynamic-list__results-count">
442                ${r}
443            </div>
444        `}get resultsSort(){return this.#e["pp-namespaced-data-sort"]}get pagination(){if(!this._pageData.length)return s;const e=this.#e["pp-dynamic-pagination"];return e&&(e.setAttribute("page-size",this.elementsPerPage),e.setAttribute("total-results",this.#a.length),e.setAttribute("current-page",this.#i)),e}get listItemsHeadlineLevel(){return this.headlineText?this.headlineLevel+1:this.headlineLevel}renderResultsItem(e){if(!e)return s;const i=e.images?.find(e=>"default"===e.type)??e.images?.[0],a=e.content?.map(e=>n(e)),r=e.teaserContent?.map(e=>n(e));return t`
445                <pp-map-item-details
446                    item-id=${o(e.id)}
447                    title-text=${o(e.title)}
448                    title-level=${this.listItemsHeadlineLevel}
449                    subtitle-text=${o(e.subtitle)}
450                    location-text=${o(e.location?.label)}
451                    img-src=${o(i?.src)}
452                    img-alt=${o(i?.alt)}
453                    img-position=${o(this.imagePosition)}
454                    .addressData=${e.address}
455                    .linksData=${e.links}
456                    topic-label=${e.topic_label}
457                    .tagsData=${e.topics}
458                    title-url=${o(e.title_url)}
459                    clickable=${o(this.clickable)}
460                >
461                    <div>
462                        ${this.showTeaserContent?r:a}
463                    </div>
464                </pp-map-item-details>
465            `}get resultsList(){return this._pageData?.length?t`
466                <ol class="namespaced-dynamic-list__results">
467                    ${this._pageData.map(e=>t`
468                        <li class="namespaced-dynamic-list__result">
469                            ${this.renderResultsItem(e)}
470                        </li>
471                    `)}
472                </ol>
473            `:s}get cssStyles(){return t`<style>
474            .namespaced-dynamic-list {
475                font-family: sans-serif;
476                font-size: 1rem;
477                padding: 0.5rem 1rem;
478            }
479
480            .namespaced-dynamic-list__headline {
481                margin-bottom: 2rem;
482            }
483
484            .namespaced-dynamic-list__meta {
485                display: flex;
486                align-items: flex-start;
487                justify-content: space-between;
488                margin-bottom: 1rem;
489                flex-wrap: wrap;
490                gap: 1rem;
491            }
492
493            .namespaced-dynamic-list__results {
494                list-style-type: none;
495                padding-left: 0;
496            }
497
498            .namespaced-dynamic-list__results-count {
499                font-style: italic;
500            }
501
502            .namespaced-dynamic-list__result {
503                margin: 3rem auto;
504            }
505        </style>`}render(){return t`
506            ${this.cssStyles}
507            <div class="namespaced-dynamic-list">
508                ${this.headline}
509                ${this.spinner}
510                <div class="namespaced-dynamic-list__meta">
511                    ${this.resultsCount}
512                    ${this.resultsSort}
513                </div>
514                ${this.resultsList}
515                ${this.pagination}
516            </div>
517        `}createRenderRoot(){return this}});customElements.define("pp-namespaced-data-sort",class extends x{static get properties(){return{namespace:{type:String}}}eventBus;constructor(){super(),this._children=v(this)}firstUpdated(){this.eventBus=new j(this.namespace),this.eventBus.on(C,this.updateSortSettings),this.addEventListener(d,this.emitSortSettings)}updateSortSettings=e=>{const t=e.detail.defaultSort?e.detail.defaultSort:{property:"title",ascending:!0,type:"string"};this.eventBus.dispatch(z,{...t}),this.eventBus.off(C,this.updateSortSettings)};emitSortSettings=e=>{this.eventBus.dispatch(k,{...e?.detail})};render(){return this._children}});customElements.define("pp-namespaced-filters",class extends x{eventBus;filters={};groupSegments;static get properties(){return{_loading:{type:Boolean,state:!0},namespace:{type:String},headlineLevel:{attribute:"headline-level",type:Number},activeFilters:{type:Object}}}constructor(){super(),this.headlineLevel=2,this.activeFilters={},this._loading=!1,this.classList.add("qs-namespaced-filters")}firstUpdated(){this.eventBus=new j(this.namespace),this.eventBus.on(L,this.updateFilters),this.addEventListener("dynamic-filter-toggle",this.updateSelection),this.eventBus.on(E,this.setActiveFilters),this.eventBus.dispatch(P,{callback:this.updateFilters}),this.eventBus.on(O,()=>{this._loading=!0}),this.eventBus.on(R,()=>{this._loading=!1}),this.eventBus.on(M,()=>{this._loading=!1})}setActiveFilters=e=>{this.activeFilters={...e.detail},this.refresh()};updateFilters=e=>{this.filters=e?.detail??e,this.activeFilters&&this.setSelection(),this.refresh()};removeUnavailableFilters(e,t){const i={...e};
517return Object.keys(i).forEach(e=>{const s=i[e],a=t.groups.find(t=>t.id===e);a?(Object.keys(s).forEach(e=>{const t=s[e],i=a.filters.find(t=>t.id===e);i?(s[e]=t.filter(e=>i.entries.some(t=>t.id===e)),0===s[e].length&&delete s[e]):delete s[e]}),0===Object.keys(s).length&&delete i[e]):delete i[e]}),i}setSelection(){const e=this.removeUnavailableFilters(this.activeFilters,this.filters);this.eventBus.dispatch(T,e)}buildAndSaveGroupSegments(){this.filters?.groups?.length?this.groupSegments=this.filters.groups.map(e=>t`
518                <div>
519                    ${_(this.headlineLevel,e.label)}
520                    ${this.renderFilters(e)}
521                </div>
522            `):this.groupSegments=s}renderFilters(e){return e?.filters?.length?1===e.filters.length?this.renderFilter(e.filters[0],e.id):t`
523                <ul class="pp-namespaced-filters-select-list">
524                    ${e.filters.map(i=>t`
525                        <li class="pp-namespaced-filters-select-list-item">
526                            ${this.renderFilter(i,e.id)}
527                        </li>
528                    `)}
529                </ul>
530            `:s}renderFilter=(e,t)=>{switch(e.type){case"checkbox":return this.renderCheckboxList(e,t);case"select":return this.renderSelect(e,t);default:return s}};renderCheckboxList(e,i){return t`
531            ${_(this.headlineLevel+1,e.label)}
532            <ul class="pp-namespaced-filters-checkbox-list">
533                ${e.entries?.map(t=>this.renderCheckbox(t,e.id,i))}
534            </ul>
535        `}renderCheckbox(e,i,s){const a=`checkbox_tooltip_${e.id}`,r=i,n=this.isFilterSelected(i,e.id,s),o=e.id,l=s,p=e.label;return t`<li>
536            <div class="pp-namespaced-filters-checkbox-wrapper">
537                <input type="checkbox" class="pp-namespaced-filters-checkbox" id="${a}" value="${o}" name="${r}" @change="${this.updateSelection}" data-input-group="${l}" ?checked="${n}" />
538                <label for="${a}" class="pp-namespaced-filters-checkbox-label">${p}</label>
539            </div>
540        </li>`}isFilterSelected(e,t,i){return this.activeFilters?.[i]?.[e]?.includes(t)}updateSelection(e){e.stopPropagation();const t=e.target,i={entry:t?.value,filter:t?.name,group:t?.dataset.inputGroup};this.eventBus.dispatch(w,i),this.refresh()}renderSelect(e,t){const i=e.entries.map(i=>({...i,isSelected:this.isFilterSelected(e.id,i.id,t)}));return H.renderSelf({label:e.label,entries:i,namespace:this.namespace,filterId:e.id,isButton:!0,groupId:t,singleChoice:!e.multiple})}async refresh(){this.groupSegments=s,this.requestUpdate(),await this.updateComplete,this._loading=!1,this.buildAndSaveGroupSegments(),this.requestUpdate()}render(){return this._loading?s:t`
541            <style>
542            pp-namespaced-filters {
543                font-family: sans-serif;
544                display: block;
545            }
546            pp-namespaced-filters ul {
547                list-style-type: none;
548            }
549            pp-namespaced-filters ul.pp-namespaced-filters-checkbox-list li:not(:last-child) {
550                margin-bottom: var(--pp-namespaced-filters-spacing);
551            }
552            .pp-namespaced-filter-select-list {
553                display: flex;
554                gap: 0.5rem;
555            }
556            .pp-namespaced-filters-checkbox-wrapper {
557                display: flex;
558                align-items: center;
559            }
560            .pp-namespaced-filters-select-list {
561                display: flex;
562                gap: var(--pp-namespaced-filters-select-list-gap);
563                flex-direction: var(--pp-namespaced-filters-select-list-direction);
564            }
565            .pp-namespaced-filters-select-list-item {
566                width: var(--pp-namespaced-filters-select-width);
567            }
568            .pp-namespaced-filters-checkbox-list {
569                display: flex;
570                gap: var(--pp-namespaced-filters-checkbox-list-gap);
571                flex-direction: var(--pp-namespaced-filters-checkbox-list-direction);
572            }
573            pp-namespaced-filters select{
574                padding: 0.5rem 1rem;
575                width: var(--pp-namespaced-filters-select-width);
576                font-size: var(--pp-namespaced-filters-select-font-size);
577                background-color: var(--pp-namespaced-filters-select-background-color);
578                border: var(--pp-namespaced-filters-select-border);
579                border-radius: var(--pp-namespaced-filters-select-border-radius);
580                color: var(--pp-namespaced-filters-select-color);
581                cursor: pointer;
582            }
583            .pp-namespaced-filters-checkbox{
584                position: relative;
585                left: 1rem;
586                z-index: 0;
587                -webkit-appearance: none;
588            }
589            .pp-namespaced-filters-checkbox-label::before {
590                width: 1rem;
591                height: 1rem;
592                border-radius: var(--pp-namespaced-filters-checkbox-border-radius);
593                border-width: var(--pp-namespaced-filters-checkbox-border-width);
594                border-style: solid;
595                border-color: var(--pp-namespaced-filters-checkbox-border-color);
596                background-color: var(--pp-namespaced-filters-checkbox-background-color);
597                display: block;
598                content: "";
599                float: left;
600                margin-right: 0.25rem;
601                margin-top: -0.25rem;
602                z-index: 5;
603                position: relative;
604            }
605            .pp-namespaced-filters-checkbox[checked]+label::before {
606                box-shadow: inset 0px 0px 0px 3px var(--pp-namespaced-filters-checkbox-background-color);
607                background-color: var(--pp-namespaced-filters-checkbox-border-color);
608            }
609            </style>
610            ${this.groupSegments}
611        `}});const de=e=>class extends e{static get properties(){return{etEventAction:{type:String,attribute:"et-event-action"},etEventCategory:{type:String,attribute:"et-event-category"},etEventObject:{type:String,attribute:"et-event-object"}}}get firesEtEvent(){return void 0!==this.etEventCategory&&void 0!==this.etEventObject}dispatchTrackingEvent(){if(this.firesEtEvent&&"function"==typeof window._etracker?.isTrackingEnabled&&window._etracker.isTrackingEnabled()){const t=window._etracker?.sendEvent;if("function"==typeof t)try{t(new window.et_UserDefinedEvent(this.etEventObject,this.etEventCategory,this.etEventAction))}catch(e){}}}};
611class he extends(de(x)){static get properties(){return{namespace:{type:String},resetShow:{type:Boolean,attribute:"reset-show"},resetLabel:{type:String,attribute:"reset-label"},headlineLabel:{type:String,attribute:"headline-label"},headlineLevel:{type:Number,attribute:"headline-level"},removeLabel:{type:String,attribute:"remove-label"}}}eventBus;filters={};selectedItems=[];facetList;constructor(){super(),this.headlineLabel="",this.headlineLevel=2,this.resetShow=!1,this.resetLabel="Filter zurücksetzen",this.removeLabel="Filter entfernen"}firstUpdated(){this.eventBus=new j(this.namespace),this.eventBus.on(L,this.updateFilters),this.eventBus.dispatch(P,{callback:this.updateFilters}),this.eventBus.on(w,this.toggleSelection),this.eventBus.on(I,this.removeSelection)}updateFilters=e=>{this.filters=e?.detail??e,this.setSelection(),this.refresh()};setSelection(){this.selectedItems=this.selectedItems.filter(e=>this.filters?.groups?.find(t=>t.id===e.group)?.filters?.find(t=>t.id===e.filter)?.entries?.some(t=>t.id===e.entry))}removeSelection=e=>{const t={...e.detail},i=this.selectedItems.findIndex(e=>e.entry===t.entry);i>-1&&this.selectedItems.splice(i,1),this.refresh()};toggleSelection=e=>{const t={...e.detail},i=this.selectedItems.findIndex(e=>e.entry===t.entry);if(i>-1)this.selectedItems.splice(i,1);else{const e=this.filters.groups?.find(e=>e.id===t.group),i=e?.filters?.find(e=>e.id===t.filter),s=i?.entries?.find(e=>e.id===t.entry);this.selectedItems.push({...t,entryLabel:s?.label,filterLabel:i?.label,groupLabel:e?.label}),this.selectedItems.sort((e,t)=>e.filterLabel.localeCompare(t.filterLabel)||e.entryLabel.localeCompare(t.entryLabel)),this.etEventObject=`${i?.id}=${s?.label}`,this.dispatchTrackingEvent()}this.refresh()};async refresh(){this.facetList=s,this.requestUpdate(),await this.updateComplete,this.renderFacets(),this.requestUpdate()}get headline(){const e=this.headlineLevel>=1&&this.headlineLevel<=6?this.headlineLevel:2,t=p(`h${e}`);return this.headlineLabel?l`
612                <${t} 
613                    class="pp-namespaced-selected-filters__headline" 
614                >
615                    ${this.headlineLabel}
616                </${t}>`:s}emitRemoveItemEvent(e){const t={group:e.currentTarget.dataset.group,filter:e.currentTarget.dataset.filter,entry:e.currentTarget.dataset.entry};this.eventBus.dispatch(I,t)}renderFacets(){this.facetList=this.selectedItems.map(e=>l`
617            <li class="pp-namespaced-selected-filter__list__item">
618                <button 
619                    class="pp-namespaced-selected-filter__button"
620                    data-group="${e.group}"
621                    data-filter="${e.filter}"
622                    data-entry="${e.entry}"
623                    @click="${this.emitRemoveItemEvent}"
624                    aria-label="${e.entryLabel} ${this.removeLabel}"
625                >   
626                    <span class="pp-namespaced-selected-filter__label">${e.filterLabel}</span>
627                    <span class="pp-namespaced-selected-filter__option">${e.entryLabel}</span>
628                    <span class="u-icon-close pp-namespaced-selected-filters__close" aria-hidden="true"></span>
629                </button>
630            </li>`)}resetFilters(){[...this.selectedItems].forEach(e=>{const{group:t,filter:i,entry:s}=e;this.eventBus.dispatch(I,{group:t,filter:i,entry:s})})}get resetButton(){return this.resetShow?l`
631                <button type="button" class="pp-namespaced-selected-filters__reset" @click=${this.resetFilters}>
632                    ${this.resetLabel}
633                </button>`:s}render(){return this.selectedItems.length?l`
634                <style>
635                    .pp-namespaced-selected-filters__list {
636                        list-style-type: none;
637                        display: flex;
638                        flex-wrap: wrap;
639                        gap: var(--pp-namespaced-selected-filters-list-spacing);
640                    }
641                    .pp-namespaced-selected-filter__button {
642                        cursor: auto;
643                        position: relative;
644                        background: var(--pp-namespaced-selected-filters-button-background);
645                        border-radius: var(--pp-namespaced-selected-filters-button-border-radius);
646                        border-width: var(--pp-namespaced-selected-filters-button-border-width);
647                        border-style: solid;
648                        border-color: var(--pp-namespaced-selected-filters-button-border-color);
649                        font-size: var(--pp-namespaced-selected-filters-button-text-size);
650                        padding: var(--pp-namespaced-selected-filters-button-padding);
651                    }
652                    .pp-namespaced-selected-filters__close {
653                        cursor: pointer;
654                        width: .5rem;
655                        height: .5rem;
656                        display: block;
657                        position: absolute;
658                        top: .75rem;
659                        right: .75rem;
660                        color: red;
661                    }
662                </style>
663                <div class="pp-namespaced-selected-filters__container">
664                    ${this.headline}
665                    <ul class="pp-namespaced-selected-filters__list">
666                        ${this.facetList}
667                    </ul>
668                    ${this.resetButton}
669                </div>`:s}}customElements.define("pp-namespaced-selected-filters",he);const ue='\n    <svg style="width: 100%; height: auto;" width="12px" height="16px" viewBox="0 0 12 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <g transform="translate(-6.000000, -4.000000)">\n            <path d="M11.7142857,4 C8.56337634,4 6,6.673584 6,9.95996094 C6,11.5202637 6.91430444,13.6306153 8.71739892,16.2322998 C10.035369,18.1337891 11.3320381,19.5762939 11.386578,19.6367188 L11.7142857,20 L12.0419934,19.6367188 C12.0965333,19.5762939 13.3932024,18.1337891 14.7111725,16.2322998 C16.514267,13.6306152 17.4285714,11.5202637 17.4285714,9.95996094 C17.4285714,6.673584 14.8650781,4 11.7142857,4 Z M11.7142857,13.866333 C9.50870162,13.866333 7.71428571,12.0720488 7.71428571,9.866333 C7.71428571,7.66074893 9.50870162,5.866333 11.7142857,5.866333 C13.9198698,5.866333 15.7142857,7.66074893 15.7142857,9.866333 C15.7142857,12.0720488 13.9198698,13.866333 11.7142857,13.866333 Z" id="Shape"></path>\n        </g>\n    </svg>\n';customElements.define("pp-namespaced-map",class extends x{static get properties(){return{loading:{reflect:!0,attribute:!1},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},duration:{type:Number},lat:{type:Number},long:{type:Number},namespace:{type:String},mapTileUrl:{type:String,attribute:"map-tile-url"}
669,searchEndpoint:{type:String,attribute:"search-endpoint"},dataEndpoint:{type:String,attribute:"data-endpoint"},tileSize:{type:Number,attribute:"tile-size"},zoomOffset:{type:Number,attribute:"zoom-offset"},gestureHandling:{type:Boolean,attribute:"gesture-handling"},textTouch:{type:String,attribute:"text-touch"},textScroll:{type:String,attribute:"text-scroll"},textScrollMac:{type:String,attribute:"text-scroll-mac"},textClosePopup:{type:String,attribute:"text-close-popup"},textZoomIn:{type:String,attribute:"text-zoom-in"},textZoomOut:{type:String,attribute:"text-zoom-out"},textClusterLabel:{type:String,attribute:"text-cluster-label"},tooltipHeadlineLevel:{type:String,attribute:"tooltip-headline-level"},tooltipUseContactInfo:{type:Boolean,attribute:"tooltip-use-contact-info"},tooltipImagePosition:{type:String,attribute:"tooltip-image-position"}}}get config(){return{center:[this.lat,this.long],maxZoom:this.maxZoom,minZoom:this.minZoom,zoom:this.zoom,zoomControl:!1,gestureHandling:this.gestureHandling,gestureHandlingOptions:{text:{touch:this.textTouch,scroll:this.textScroll,scrollMac:this.textScrollMac},duration:this.duration}}}get mapStyle(){return{color:"#80cdec",dashArray:"3",fillColor:"#80cdec",fillOpacity:.7,opacity:1,weight:2}}get tooltipConfig(){return{maxWidth:"auto",minWidth:300,maxHeight:"100%",autoPan:!1,keepInView:!0,className:"tooltip-wrapper",pane:"fixed"}}get markerClusterConfig(){return{showCoverageOnHover:!1,animateAddingMarkers:!0,iconCreateFunction:e=>this.createClusterIcon(e.getChildCount())}}handleFormSubmit(e){this.eventBus.dispatch($,e.detail)}createClusterIcon(e){return this.Leaflet.divIcon({className:"pp-interactive-map-marker-cluster",iconSize:[40,40],iconAnchor:[20,20],html:`\n                <div class="cluster-label" aria-label="${e} ${this.textClusterLabel}" role="button">\n                    <div class="cluster-marker">\n    <svg style="width: 100%; height: auto;" width="40px" height="40px" viewBox="0 0 40 40" fill="currentColor" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        <circle cx="20" cy="20" r="15"></circle>\n        <circle fill-opacity="0.201294799" cx="20" cy="20" r="20"></circle>\n    </svg>\n</div>\n                    <div class="cluster-marker-count">${e}</div>\n                </div>\n            `})}createDefaultIcon=e=>{const t=this.iconConfig.find(t=>e?.filteredBy?.includes(t.filteredBy));return t?this.Leaflet.divIcon({className:"custom-image-marker",iconSize:[32,32],iconAnchor:[16,32],html:`<img role="button" alt="${e?.label}" src="${t.defaultUrl}">`}):this.Leaflet.divIcon({className:"location-marker",iconSize:[22,30],iconAnchor:[11,30],html:`<span aria-label="${e?.label}" role="button">${ue}</span>`})};createActiveIcon=e=>{const t=this.iconConfig.find(t=>e?.filteredBy?.includes(t.filteredBy));return t?this.Leaflet.divIcon({className:"custom-image-marker-active",iconSize:[32,32],iconAnchor:[16,32],html:`<img role="button" alt="${e?.label}" src="${t.activeUrl}">`}):this.Leaflet.divIcon({className:"location-marker-active",iconSize:[33,48],iconAnchor:[16.5,48],html:`<span aria-label="${e?.label}" role="button">${ue}</span>`})};get mapContainerId(){return`${this.namespace}_map-container`}Leaflet;map;markerCluster;currentMapFeatures;iconConfig=[];constructor(){super(),this.zoom=6,this.minZoom=4,this.maxZoom=18,this.duration=1500,this.lat=51,this.long=9,this.tileSize=512,this.zoomOffset=0,this.gestureHandling=!0,this.textTouch="Mit zwei Fingern die Karte verschieben",this.textScroll="Mit Strg + Mausrad zoomen",this.textScrollMac="Mit cmd (⌘) + Mausrad zoomen",this.textClosePopup="Popup schliessen",this.textZoomIn="Hineinzoomen",this.textZoomOut="Rauszoomen",this.textClusterLabel="gruppierte Elemente",this._children=v(this,["pp-headline","pp-map-copyright-link","pp-spinner"]),this.loading=!0}async firstUpdated(){if(this.eventBus=new j(this.namespace),await this.initializeMap(),this.eventBus.on(C,this.saveSettings),this.eventBus.dispatch(A,{callback:this.saveSettings}),this.eventBus.on(S,this.redrawMarkers),this.eventBus.dispatch(F,{callback:this.redrawMarkers}),this.searchEndpoint&&this.dataEndpoint){pe.connect(this.namespace,{searchEndpoint:this.searchEndpoint,dataEndpoint:this.dataEndpoint})&&this.eventBus.dispatch($)}this.eventBus.on(O,()=>{this.loading=!0}),this.eventBus.on(M,()=>{this.loading=!1})}async initializeMap(){window.L&&window.L.version?this.Leaflet=window.L:(this.Leaflet=await r(()=>import("./leaflet-src-BS25Lg1B.js").then(e=>e.l),[],import.meta.url),window.L=this.Leaflet),window.L?.markerClusterGroup||await r(()=>import("./leaflet.markercluster-src-jQW0ycQC.js").then(e=>e.l),[],import.meta.url),await r(()=>import("./leaflet-gesture-handling.min-DulQ1P_O.js").then(e=>e.l),[],import.meta.url);const e=this.renderRoot.querySelector(`#${this.mapContainerId}`);this.map=this.Leaflet.map(e,this.config),this.Leaflet.tileLayer(this.mapTileUrl,{tileSize:this.tileSize,zoomOffset:this.zoomOffset,minZoom:1,crossOrigin:!0,attribution:this._children["pp-map-copyright-link"]?.outerHTML||""}).addTo(this.map),this.Leaflet.control.zoom({position:"bottomright",zoomInTitle:this.textZoomIn,zoomOutTitle:this.textZoomOut}).addTo(this.map),this.map.createPane("fixed",document.getElementById(this.mapContainerId))}compareMarkers(e){if(e.length===this.currentMapFeatures?.length){const t=this.currentMapFeatures.map(e=>e.properties.id);let i=!0,s=0;for(;i&&s<e.length;)i=t.includes(e[s]?.properties?.id),s+=1;return i}return!1}redrawMarkers=async e=>{let t=[];Array.isArray(e)?t=e:Array.isArray(e?.detail)&&(t=e.detail),this.compareMarkers(t)?this.loading=!1:(this.currentMapFeatures=[...t],this.markerCluster&&this.clearMarkers(),this.addMarkers(t?._source))};
669addMarkers(e){this.markerCluster=this.Leaflet.markerClusterGroup(this.markerClusterConfig);const t=this.currentMapFeatures.filter(e=>e.geometry?.coordinates?.length>0),i=this.Leaflet.geoJSON(t,{style:this.mapStyle,pointToLayer:(e,t)=>this.Leaflet.marker(t,{icon:this.createDefaultIcon(e?.properties)}),onEachFeature:this.onEachFeature});i.getLayers()?.length&&(this.markerCluster.addLayer(i),this.map.addLayer(this.markerCluster),"search"===e&&this.map.fitBounds(this.markerCluster.getBounds())),this.loading=!1}clearMarkers(){this.map.removeLayer(this.markerCluster)}onEachFeature=(e,t)=>{t.bindPopup(this.renderMapToolTip({...e.properties}),this.tooltipConfig),t.on("popupopen",this.onPopupOpen),t.on("popupclose",this.onPopupClose)};onPopupClose=e=>{e?.popup?._source?._icon?.focus(),e?.popup?._source?._icon&&e.target.setIcon(this.createDefaultIcon(e?.target?.feature?.properties))};onPopupOpen=e=>{e.target.setIcon(this.createActiveIcon(e?.target?.feature?.properties)),e.popup._container.setAttribute("tabindex","-1"),e.popup._container.focus();const t=e.popup._container.querySelector(".leaflet-popup-close-button");e.popup._container.removeChild(t),e.popup._container.appendChild(t),t.setAttribute("aria-label",this.textClosePopup),e.popup._container.addEventListener("focusout",t=>{!e.popup._container.contains(t.relatedTarget)&&this.map._container.contains(t.relatedTarget)&&this.map.closePopup()}),t.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||(e.preventDefault(),this.map.closePopup())})};renderMapToolTip({id:e}){const t={namespace:this.namespace,headlineLevel:this.tooltipHeadlineLevel,useContactInfo:this.tooltipUseContactInfo,tooltipImagePosition:this.tooltipImagePosition};return(e=>{const t=document.createElement("div");return i(e,t),t.innerHTML})(ce.renderSelf(e,t))}saveSettings=e=>{Array.isArray(e?.icons)?this.iconConfig=e.icons:Array.isArray(e?.detail?.icons)&&(this.iconConfig=e.detail.icons)};get headline(){return this._children["pp-headline"]?t`
670                <div class="qs-map__headline sr-only">
671                    ${this._children?.["pp-headline"]}
672                </div>
673            `:s}get spinnerClasses(){return{hidden:!this.loading}}render(){return t`
674            <style>
675                pp-namespaced-map {
676                    font-family: sans-serif;
677                }
678                pp-namespaced-map .qs-map {
679                    width: 100%;
680                    height: 830px;
681                }
682                pp-namespaced-map .leaflet-fixed-pane {
683                    width: 100%;
684                    bottom: 0;
685                    pointer-events: none;
686                }
687                
688                pp-namespaced-map .leaflet-popup-content {
689                    pointer-events: auto;
690                }
691                
692                pp-namespaced-map .leaflet-popup-tip-container {
693                    display: none;
694                }
695                
696                pp-namespaced-map .leaflet-popup-content-wrapper {
697                    border-radius: 0;
698                }
699                pp-namespaced-map .leaflet-top,
700                pp-namespaced-map .leaflet-bottom {
701                    z-index: 800;
702                }
703                /* needs to be important, otherwise default leaflet css overrides it */
704                pp-namespaced-map .tooltip-wrapper {
705                    position: absolute !important;
706                    bottom: 1rem !important;
707                    left: 50% !important;
708                    transform: translateX(-50%) !important;
709                    width: 83.333333% !important;
710                }
711                pp-namespaced-map .pp-interactive-map-marker-cluster {
712                    color: var(--pp-interactive-map-cluster-color);
713                }
714                pp-namespaced-map .pp-interactive-map-marker-cluster:focus {
715                    color: var(--pp-interactive-map-cluster-active-color);
716                }
717                pp-namespaced-map .cluster-label {
718                    display: flex;
719                    align-items: center;
720                    justify-content: center;
721                    height: 100%;
722                    width: 100%;
723                }
724                pp-namespaced-map .cluster-marker {
725                    position: absolute;
726                    width: 100%;
727                    height: 100%;   
728                }
729                pp-namespaced-map .cluster-marker-count {
730                    color: var(--pp-interactive-map-cluster-count-color);
731                    position: relative;
732                    font-size: var(--pp-interactive-map-cluster-text-size);
733                }
734                pp-namespaced-map .location-marker {
735                    color: var(--pp-interactive-map-location-marker-color);
736                }
737                pp-namespaced-map .location-marker-active{
738                    color: var(--pp-interactive-map-location-marker-active-color);
739                }
740                pp-namespaced-map .spinner-loading-wrapper {
741                    display: flex;
742                    justify-content: center;
743                    align-items: center;
744                    position: absolute;
745                    left: 0;
746                    top: 0;
747                    right: 0;
748                    bottom: 0;
749                    background-color: rgba(255, 255, 255, 0.5);
750                    z-index: 500;
751                }
752                pp-namespaced-map .spinner-loading-wrapper.hidden {
753                    display:none;
754                }
755            </style>
756            ${this.headline}
757            <div id="${this.mapContainerId}" class="js-map qs-map">
758                <div class="qs-namespaced-map__spinner ${a(this.spinnerClasses)} spinner-loading-wrapper">
759                    ${this._children?.["pp-spinner"]}
760                </div>
761            </div>
762        `}});const me=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));
762export{h as B,d as S,b as c,v as g,me as i};

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.