1import{a as z}from"./fjQKivPl.js";import{n as L,b8 as A,U as j,b9 as F,ba as N,bb as q,bc as H,bd as W,k as M,l as y,u as m,p as E,x as u,j as B,g as V,aH as I,be as x,af as J,aN as X,aY as R,m as Y,_ as K,bf as G,r as Q,o as Z,e as ee,bg as te}from"./BVMTLTto.js";function oe(e,n){if(typeof e!="string")throw new TypeError("argument str must be a string");const t={},o=n||{},i=o.decode||ne;let s=0;for(;s<e.length;){const a=e.indexOf("=",s);if(a===-1)break;let c=e.indexOf(";",s);if(c===-1)c=e.length;else if(c<a){s=e.lastIndexOf(";",a-1)+1;continue}const r=e.slice(s,a).trim();if(o?.filter&&!o?.filter(r)){s=c+1;continue}if(t[r]===void 0){let l=e.slice(a+1,c).trim();l.codePointAt(0)===34&&(l=l.slice(1,-1)),t[r]=ie(l,i)}s=c+1}return t}function ne(e){return e.includes("%")?decodeURIComponent(e):e}function ie(e,n){try{return n(e)}catch{return e}}const S=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function P(e,n,t){const o=t||{},i=o.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!S.test(e))throw new TypeError("argument name is invalid");const s=i(n);if(s&&!S.test(s))throw new TypeError("argument val is invalid");let a=e+"="+s;if(o.maxAge!==void 0&&o.maxAge!==null){const c=o.maxAge-0;if(Number.isNaN(c)||!Number.isFinite(c))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(o.domain){if(!S.test(o.domain))throw new TypeError("option domain is invalid");a+="; Domain="+o.domain}if(o.path){if(!S.test(o.path))throw new TypeError("option path is invalid");a+="; Path="+o.path}if(o.expires){if(!se(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invali
1d");a+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(a+="; HttpOnly"),o.secure&&(a+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{a+="; Priority=Low";break}case"medium":{a+="; Priority=Medium";break}case"high":{a+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{a+="; SameSite=Strict";break}case"lax":{a+="; SameSite=Lax";break}case"strict":{a+="; SameSite=Strict";break}case"none":{a+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(a+="; Partitioned"),a}function se(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function g(e){if(typeof e!="object")return e;var n,t,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){t=new e.constructor;for(n in e)e.hasOwnProperty(n)&&t[n]!==e[n]&&(t[n]=g(e[n]))}else{t={};for(n in e)n==="__proto__"?Object.defineProperty(t,n,{value:g(e[n]),configurable:!0,enumerable:!0,writable:!0}):t[n]=g(e[n])}return t}if(o==="[object Array]"){for(n=e.length,t=Array(n);n--;)t[n]=g(e[n]);return t}return o==="[object Set]"?(t=new Set,e.forEach(function(i){t.add(g(i))}),t):o==="[object Map]"?(t=new Map,e.forEach(function(i,s){t.set(g(s),g(i))}),t):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(t=new RegExp(e.source,e.flags),t.lastIndex=e.lastIndex,t):o==="[object DataView]"?new e.constructor(g(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const ae={path:"/",watch:!0,decode:e=>F(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},T=globalThis.cookieStore;function re(e,n){const t={...ae,...n};t.filter??=l=>l===e;const o=_(t)||{};let i;t.maxAge!==void 0?i=t.maxAge*1e3:t.expires&&(i=t.expires.getTime()-Date.now());const s=i!==void 0&&i<=0,a=s||o[e]===void 0||o[e]===null,c=g(s?void 0:o[e]??t.default?.()),r=i&&!s?ue(c,i,t.watch&&t.watch!=="shallow"):L(c);{let l=null;try{!T&&typeof BroadcastChannel<"u"&&(l=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const p=(d=!1)=>{!d&&(t.readonly||H(r.value,o[e]))||(le(e,r.value,t),o[e]=g(r.value),l?.postMessage({value:t.encode(r.value)}))},b=d=>{const h=d.refresh?_(t)?.[e]:t.decode(d.value);w=!0,r.value=h,o[e]=g(h),W(()=>{w=!1})};let w=!1;const k=!!N();if(k&&A(()=>{w=!0,p(),l?.close()}),T){const d=h=>{const f=h.changed.find(v=>v.name===e),C=h.deleted.find(v=>v.name===e);f&&b({value:f.value}),C&&b({value:null})};T.addEventListener("change",d),k&&A(()=>T.removeEventListener("change",d))}else l&&(l.onmessage=({data:d})=>b(d));t.watch&&j(r,()=>{w||p()},{deep:t.watch!=="shallow"}),a&&p(a)}return r}function _(e={}){return oe(document.cookie,e)}function ce(e,n,t={}){return n==null?P(e,n,{...t,maxAge:-1}):P(e,n,t)}function le(e,n,t={}){document.cookie=ce(e,n,t)}const $=2147483647;function ue(e,n,t){let o,i,s=0;const a=t?L(e):{value:e};return N()&&A(()=>{i?.(),clearTimeout(o)}),q((c,r)=>{t&&(i=j(a,r));function l(){s=0,clearTimeout(o);const p=n-s,b=p<$?p:$;o=setTimeout(()=>{if(s+=b,s<n)return l();a.value=void 0,r()},b)}return{get(){return c(),a.value},set(p){l(),a.value=p,r()}}})}const pe=V("useHeaderLogoProps"),Ue=()=>{const e=M().siteIdentity,n=B(),t=y(),{locale:o,t:i}=m(),s=u(()=>n.public.DESIGNTYPE==="freebrand-simple"),a=u(()=>t.path.split("/")[2]==="nsb"),c=L(null);E(async()=>{if(!a.value||!t.query.id)return;const f=z(`onsb_${o.value}_${t.query.id}`),C=`${n.public.CONTENTBROKER_NEWS_API_PUBLIC_URL}/v1/${f}`;try{const D=(await(await fetch(C)).json())?.content;c.value=D?.departments?.[0]?.name}catch(v){pe.error("Error fetching data:",v)}});const r=e?.metadata,l=u(()=>a.value?c.value??"Webseiten Titel":""),p=u(()=>r?.websiteSubtitle?r?.websiteTitle+" <br>"+r?.websiteSubtitle:r?.websiteTitle??"Webseiten Titel"),b=u(()=>{const f="Mobile Titel";return a.value?c.value??f:r?.websiteTitleMobile??f}),w=u(()=>{const f=s.value?"":"/images/swiss-logo-flag.svg";return r?.websiteLogo?.originalUrl??f}),k=u(()=>r?.websiteLogo?.imageAlt??i("headerLogoAlt")),d=u(()=>{const f=s.value?"":"/images/swiss-logo-name.svg";return r?.websiteLogoAddition?.originalUrl??f}),h=u(()=>r?.websiteLogoAddition?.imageAlt??i("headerDescriptionAlt"));return{props:u(()=>({homepagelink:`/${o.value}`,title:p.value,accronym:b.value,logoImagePath:w.value,logonameimagepath:d.value,logoAltText:k.value,logoDescriptionAltText:h.value,homepageLinkLabel:i("haederLinkLabel"),isFreebrand:s.value})),nsbTitle:l}},de=e=>window?.sessionStorage?sessionStorage.getItem(e):null,fe=e=>{window?.sessionStorage&&sessionStorage.removeItem(e)},ge=(e,n)=>{window?.sessionStorage&&sessionStorage.setItem(e,n)},be=(e,n)=>{let t=`/${n}`;const o=de("accessiblePageEntry");if(!o)return t;try{const{standardPage:i,accessiblePage:s}=JSON.parse(o);e===s&&(t=i)}catch{}return fe("accessiblePageEntry"),t},me=(e,n)=>{try{ge("accessiblePageEntry",JSON.stringify({standardPage:e,accessiblePage:n}))}catch{}},je=e=>{const{accessibilityLinks:n}=I(),t=y(),{locale:o}=m(),i=n[e];return{isAvailable:u(()=>!!i),navigate:()=>{if(i)return me(t.path,i),x({path:i},{external:!0})},closePage:()=>x({path:be(t.path,o.value)},{external:!0})}},he=e=>(n="")=>{if(n===null)return null;
1const o=n.split("/").filter(Boolean),i=o[0];return e.includes(i)?`/${o.slice(1).join("/")}`:`/${o.join("/")}`},U=(e,n)=>t=>{if(t===null)return null;const o=he(e)(t);return`/${n}${o}`},we=e=>{const n=["de","fr","it","en","rm"],t=new Map(n.map((o,i)=>[o,i]));return e.sort((o,i)=>{const s=t.get(o.locale),a=t.get(i.locale);return s===void 0&&a===void 0?o.locale.localeCompare(i.locale):s===void 0?1:a===void 0?-1:s-a}),e.map(o=>({code:o.locale,label:o.label}))},ve=(e,n,t)=>{const o=Object.keys(e).map(a=>`${a}=${e[a]}`).join("&"),s=[n,...t.slice(1)].filter(Boolean).join("/");return o?`/${s}?${o}`:`/${s}`},ye=(e,n,t)=>{const o=e.find(c=>c.lang===n.code),i=y(),s=i.path.split("/").filter(Boolean);return["search","overview","publication","nsb","newnsb","apps"].includes(s[1])?U(t??[],n.code)(ve(i.query,n.code,s)):o?U(t??[],n.code)(o.slug):`/${n.code}`},ke=()=>{const{locale:e}=m(),n=J().$i18nLivingdocs.available,t=n.map(s=>s.locale),o=u(()=>we(n)),i=I().pageTranslations;return u(()=>o.value.map(s=>{const a=ye(i,s,t);return{...s,href:a??"",active:s.code===e.value}}))},Ne=()=>{const{t:e}=m(),n=ke(),t=u(()=>n.value.map(r=>({...r,label:e(r.code.toLowerCase())}))),o=u(()=>{const r=t.value.find(({active:l})=>l);return{code:r?.code?.toUpperCase()||"",label:r?.label||""}}),i=u(()=>n.value.map(({code:r})=>({value:r.toUpperCase(),name:r.toUpperCase()})));function s(r){const l=n.value.find(p=>p.code.toLowerCase()===r.toLowerCase());l?.href&&x(l.href,{external:!0})}function a(r){const l=r.value?.$el?.querySelector("select");l&&(l.value=o.value.code)}const c=u(()=>{const r=e("changeLanguage");return o.value.label?r.replaceAll(/<.*?>/gm,o.value.label):""});return{activeLanguage:o,options:i,setSelectedLanguage:s,syncSelectValue:a,translatedLabel:c}},Se=["","404","search","overviewnsb","overviewnews","overviewevents","overviewservices","overviewpublications","overvieworganizations"],Te=new Set(["page-glossary"]),xe=(e,n)=>{const t=e.replaceAll("/","");return Se.every(o=>t!==`${n}${o}`)},Le=()=>{const{locale:e}=m(),n=y(),t=I();return u(()=>{const o=t.pageContentType;return!o||Te.has(o)?!1:xe(n.path,e.value)})},Ce=()=>{const e=L(0),n=()=>{e.value=window.innerWidth};return E(()=>{n(),window.addEventListener("resize",n)}),X(()=>{window.removeEventListener("resize",n)}),u(()=>e.value<=1023?"mobile":"desktop")},Me=()=>({shareBarIsVisible:Le(),context:Ce()}),O=(e,n)=>(e?.children??[]).map(t=>({title:n&&(t.title==="easyLang"||t.title==="signLang")?n(`topBarAccessibilityTitles.${t.title}`):t.title,link:t.link,linkTarget:t.linkTarget,icon:t.icon})),Be=()=>{const e=R();return u(()=>O(e.metaNavigation))},Re=()=>{const{t:e}=m(),n=R();return u(()=>O(n.topBarNavigation,e))},Oe=()=>{const e=Y(),{locale:n}=m();return async()=>{window.history.length>1?e.back():await x({path:`/${n.value}`},{external:!0})}},De=()=>{const e=re("ssg_analytics_accepted"),n=M();function t(){o(n?.siteIdentity?.metadata?.matomoScript)}function o(i){if(!i)return;const s=document.createElement("script");s.text=i,document.body.append(s)}return E(()=>{const i=n?.siteIdentity?.metadata?.requireUserCookieConsent;(String(e.value)==="true"||!i)&&t(),o(n?.siteIdentity?.metadata?.additionalScript)}),{injectMatomoScript:t}},Ae={components:{WglNotificationBanner:G},setup(){const e=te();let n=!1;const t=e.cookiepopupData;return t&&t.cookiepopup&&(n=!0),{text:t?.cookiepopup?.cookietext||"",accepttext:t?.cookiepopup?.accepttext||"",declinetext:t?.cookiepopup?.declinetext||"",isclosed:!0,cookiepopupExists:n}},computed:{acceptAction(){return()=>{this.isclosed||this.$emit("cookieAccepted"),this.$cookies.set("ssg_analytics_accepted",!0)}},declineAction(){return()=>{this.$cookies.set("ssg_analytics_accepted",!1)}}},beforeMount(){const e=this.$cookies.isKey("ssg_analytics_accepted");this.isclosed=!(!e&&this.cookiepopupExists)}};function Ee(e,n,t,o,i,s){const a=Q("wgl-notification-banner");return Z(),ee(a,{type:"info",text:o.text,"button-accept-text":o.accepttext,"button-decline-text":o.declinetext,"is-fixed":!0,"is-closed":o.isclosed,"accept-action":s.acceptAction,"decline-action":s.declineAction},null,8,["text","button-accept-text","button-decline-text","is-closed","accept-action","decline-action"])}const ze=Object.assign(K(Ae,[["render",Ee]]),{__name:"StructureCookiepopup"}),Ie=()=>{const e=y();return u(()=>new URLSearchParams(e.query))},Pe=(e,n,t)=>{const o=new URL(e.path,t);return n.value&&(o.search=n.value.toString()),o.toString()},Fe=()=>{const e=y(),{t:n}=m(),t=B(),o=Ie();return u(()=>{const i=Pe(e,o,t.public.SITEMAP_URL);return{links:[{label:"Facebook",icon:"Facebook",link:`https://www.facebook.com/sharer.php?u=${i}`,title:n("facebookTitle")},{label:"Twitter",icon:"Twitter",link:`https://twitter.com/share?url=${i}`,title:n("twitterTitle")},{label:"LinkedIn",icon:"LinkedIn",link:`https://www.linkedin.com/sharing/share-offsite/?url=${i}`,title:n("linkedInTitle")},{label:"Xing",icon:"Xing",link:`https://www.xing.com/spi/shares/new?url=${i}`,title:n("xingTitle")},{label:"Whatsapp",icon:"Phone",link:`https://api.whatsapp.com/se
1nd?text=${n("whatsappTitle")}%20${i}`,title:n("whatsappTitle")}],website:i,copyButtonText:n("copyButtonText")}})};export{ze as C,Ne as a,je as b,Be as c,Me as d,Oe as e,De as f,Fe as g,Re as h,Ue as u};
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.