"use strict";(self.webpackChunk_spark_front_templates=self.webpackChunk_spark_front_templates||[]).push([["4603"],{3182:function(e,t,n){n.d(t,{SC:function(){return a},d8:function(){return r},ej:function(){return o},kT:function(){return c}});var o=e=>{for(var t=e+"=",n=decodeURIComponent(document.cookie).split(";"),o=0;o2&&void 0!==arguments[2]?arguments[2]:0;if(0===n)document.cookie=e+"="+t+";path=/";else{var o=new Date;o.setTime(o.getTime()+864e5*n);var r="expires="+o.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}},c=e=>{document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")},a=e=>{for(var t=document.cookie.split(";"),n=0;n{if(!!e){var t=e.split(".")[1];if(t)return JSON.parse(atob(t))}},c=e=>{var t=(0,o.ej)(e);return null===t||""===t?null:t}},470:function(e,t,n){n.d(t,{l:function(){return r}});var o=n(3182),r=()=>{var e=["pcAccess","epAccess","debug"],t=["empty"],n=["ssoSandbox","pianoSandbox"];return window.location.search.slice(1).split("&").reduce((r,c)=>{var[a,i]=c.split("=").map(decodeURIComponent);return"true"===i||"false"===i?r[a]="true"===i:r[a]=i,e.includes(a)&&sessionStorage.setItem(a,i),t.includes(a)&&localStorage.setItem(a,i),n.includes(a)&&(0,o.d8)(a,i,1),("ssoSandbox"===a||"pianoSandbox"===a)&&"false"===i&&(0,o.kT)(a),r},function(e){for(var t=1;ti});var o=n("470"),r=n("3182"),c=n("4824"),a=(0,n("971").Z)("LogoutToolTipModule"),i=e=>{a.info("running");var{ssoSandbox:t}=(0,o.l)(),n="true"===(0,r.ej)("ssoSandbox")||t,i=e.querySelector("[data-logout-button]"),u=e.querySelector("[data-user-email-selector]"),s=e.dataset.logoutRealm,l=encodeURIComponent("".concat(window.location.protocol,"//").concat(window.location.host)),d=encodeURIComponent(window.location.pathname),p=(0,c.N)("sfauthp")||"",f=(0,c.N)("sfautht")||"",g=()=>"".concat(n?"https://login-stage.funkemedien.de":"https://login.funkemedien.de","/realms/").concat(s,"/protocol/openid-connect/logout?post_logout_redirect_uri=").concat(l).concat(d,"&id_token_hint=").concat(p);if(f){var m=(0,c.a)(f);u.innerHTML="".concat(m.email,"")}null==i||i.addEventListener("click",()=>{(0,r.kT)("sfauthp"),(0,r.kT)("sfautht"),window.location.replace(g())})}}}]);