/*! @version: ad237d6 */ "use strict";(self.webpackChunk_spark_front_templates=self.webpackChunk_spark_front_templates||[]).push([[38],{3873:(e,n,t)=>{t.d(n,{U:()=>r});const o="sfauthr";var s=t(359),i=t(1093);const r=()=>{(0,s.TV)(o,"true",365),window.location.href=(0,i.d)("auth")}},359:(e,n,t)=>{t.d(n,{LD:()=>r,Ri:()=>o,TV:()=>s,Yj:()=>i});const o=e=>{const n=e+"=",t=decodeURIComponent(document.cookie).split(";");for(let e=0;e{if(0===t)document.cookie=e+"="+n+";path=/";else{const o=new Date;o.setTime(o.getTime()+24*t*60*60*1e3);const s="expires="+o.toUTCString();document.cookie=e+"="+n+";"+s+";path=/"}},i=e=>{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`},r=e=>{const n=document.cookie.split(";");for(let t=0;t{t.d(n,{d:()=>i});var o=t(359),s=t(7139);const i=(e,n,t)=>{var i,r,d,a,c;let l,p,u="",m="";if(""!==(null!=(i=null==n?void 0:n.pageUrl)?i:"")&&n){const e=t||n.pageUrl;e&&({domain:u,pathname:m}=(e=>{const n=e.replace(/^(https?:\/\/)/,""),[t,...o]=n.split("/");return{domain:t,pathname:`/${o.join("/")}`}})(e))}const f="undefined"!=typeof window&&("true"===(0,o.Ri)("ssoSandbox")||(0,s.$)().ssoSandbox||(null==n?void 0:n.sandbox)||!1),x="undefined"!=typeof window?null==(d=null==(r=window.SPARK)?void 0:r.sso)?void 0:d.clientId:n?n.clientId:"",w="undefined"!=typeof window?null==(c=null==(a=window.SPARK)?void 0:a.sso)?void 0:c.auth0Realm:n?n.auth0Realm:"";if("undefined"==typeof window)p=encodeURIComponent(`https://${u}`);else{l=(()=>{if("undefined"==typeof window)return;if(["sf-dev","sf-test","sf-uat","sf-prod","sparknews-dev","sparknews-test","sparknews-uat","sparknews"].some((e=>window.location.host.includes(e))))return;const e=window.location.host.split(".");return 3===e.length&&"www"!==e[0]?e[0]:e.length>3?e[1]:void 0})();const e=l?(e=>{const n=e.split(".");return n.length>2?n.slice(-2).join("."):e})(window.location.host):window.location.host;p=encodeURIComponent(`${l?"https://www.":"https://"}${e}`)}const h=encodeURIComponent(encodeURIComponent("undefined"!=typeof window?window.location.pathname+window.location.search:m)),g="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})),b=f?`https://login-stage.funkemedien.de/realms/${w}`:`https://login.funkemedien.de/realms/${w}`;l=l?encodeURIComponent(`/${l}/`):l;return"reset-credentials"===e?`${b}/login-actions/${e}?client_id=${x}`:`${b}/protocol/openid-connect/${"registrations"===e?e:"auth"}?client_id=${x}${"registrations"===e||"auth"===e?"":`&kc_action=${e}`}&scope=openid%20profile%20email&response_type=id_token%20token&response_mode=form_post&nonce=${g}&${`redirect_uri=${p}%2Fredirect.html%3Fo%3D${l||h}`}`}},2219:(e,n,t)=>{t.d(n,{l:()=>o});const o=e=>{const n="sandbox_info";let t=document.getElementById(n);const o=t&&Array.from(t.getElementsByTagName("span")).find((n=>{return t=e,n.textContent.includes(t);var t}));if(t||(t=document.createElement("div"),t.className="fixed bottom-4 left-2 rounded-md z-50",t.id=n,document.body.appendChild(t)),o)return;const s=document.createElement("span");s.innerText=e,s.className="text-copy-negative bg-background-900 p-2 rounded-md mr-2",t.appendChild(s)}},7139:(e,n,t)=>{t.d(n,{$:()=>c});var o=t(359),s=Object.defineProperty,i=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,a=(e,n,t)=>n in e?s(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;const c=()=>{const e=["pcAccess","epAccess","debug"],n=["empty"],t=["ssoSandbox","pianoSandbox"];return window.location.search.slice(1).split("&").reduce(((s,i)=>{const[r,d]=i.split("=").map(decodeURIComponent);return s[r]="true"===d||"false"===d?"true"===d:d,e.includes(r)&&sessionStorage.setItem(r,d),n.includes(r)&&localStorage.setItem(r,d),t.includes(r)&&(0,o.TV)(r,d,1),"ssoSandbox"!==r&&"pianoSandbox"!==r||"false"!==d||(0,o.Yj)(r),s}),((e,n)=>{for(var t in n||(n={}))r.call(n,t)&&a(e,t,n[t]);if(i)for(var t of i(n))d.call(n,t)&&a(e,t,n[t]);return e})({},{pcAccess:!1,epAccess:!1,debug:!1,pianoSandbox:!1,ssoSandbox:!1}))}},38:(e,n,t)=>{t.r(n),t.d(n,{LoginButtonModule:()=>c});var o=t(7139),s=t(359),i=t(2219),r=t(1093),d=t(3873);const a=(0,t(2193).A)("LoginButtonModule"),c=e=>{a.info("running");const{ssoSandbox:n}=(0,o.$)(),t="true"===(0,s.Ri)("ssoSandbox")||n;t&&(0,i.l)(`ssoSandbox = ${t}`),e.setAttribute("href",(0,r.d)("auth")),e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),(0,d.U)()}))}}}]);