1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8638],{349:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(94513),s=r(23365),i=r(57005),a=r(24802),l=r(98122);let c=(0,l.OZ)({Component:()=>{let{profileIframeUrl:e}=(0,i.fJ)(),{accessToken:t,isLoading:r}=(0,s.A)();if(r)return(0,n.jsx)(a.A,{title:"Profil",src:"",loadingMessage:"Laddar din profil..."});let l=t?`${e}?token=${t}`:e;return(0,n.jsx)(a.A,{title:"Profil",src:l})},shouldRedirect:l.Rm})},20146:(e,t,r)=>{"use strict";r.d(t,{h:()=>x});var n=r(94513),s=r(38255),i=r(10288),a=r(89381),l=r(57005),c=r(53334),o=r(8664),u=r(45106),d=r(20397),h=r(5930);let m=()=>(0,n.jsx)(d.v.Nav,{children:(0,n.jsx)(s.m,{children:(0,n.jsx)(d.v.HorizontalList,{children:u.JW.map(({path:e,name:t},r)=>(0,n.jsx)(h.q,{isHorizontal:!0,path:e,name:t},t+r))})})});var p=r(41528),g=r(56691);let x=({openGraphData:e,withMenu:t=!0,children:r})=>{let u=(0,l.Hr)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{openGraphData:e,titleMetaData:e,showTakeoverAd:!1}),(0,n.jsx)(o.A,{isOn:!0}),(0,n.jsxs)(g.A,{disableFooter:u,fluid:!0,children:[t?(0,n.jsx)(c.qX,{children:(0,n.jsx)(m,{})}):null,(0,n.jsx)(i.h,{value:a.B.Spacing24}),(0,n.jsx)(s.m,{withMinHeight:!0,className:"c-mypages-wrapper",children:r}),(0,n.jsx)(i.h,{value:a.B.Spacing40})]})]})}},23365:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(94285),s=r(91544),i=r(31157);class a{async getAccessToken(e){if(this.currentRoute!==e&&(this.currentRequest=null,this.currentRoute=e),this.currentRequest)return this.currentRequest;this.currentRequest=this.fetchToken();try{return await this.currentRequest}finally{setTimeout(()=>{this.currentRequest=null},200)}}async fetchToken(){try{let e=await fetch("/api/access-token");if(e.ok)return{accessToken:(await e.json()).accessToken,enabled:!0};return i.vF.error({status:e.status},"Failed to fetch access token"),{accessToken:null,enabled:!1}}catch(e){return i.vF.error({error:e},"Error fetching access token:"),{accessToken:null,enabled:!1}}}constructor(){this.currentRequest=null,this.currentRoute=null}}let l=new a,c=function(){let[e,t]=(0,n.useState)({accessToken:null,enabled:!1,loading:!1}),r=(0,s.useRouter)();return(0,n.useEffect)(()=>{(async()=>{t({accessToken:null,enabled:!0,loading:!0});try{let e=await l.getAccessToken(r.asPath);t({...e,loading:!1})}catch(e){i.vF.error({error:e},"Error in useAccess:"),t({accessToken:null,enabled:!1,loading:!1})}})()},[r.asPath]),{accessToken:e.accessToken,enabled:e.enabled,isLoading:e.loading}}},24802:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(94513),s=r(57005),i=r(91197),a=r(63279),l=r(20146),c=r(90564);let o=(0,r(60994).K)({Component:({title:e,src:t,loadingMessage:r,errorMessage:o="Det gick tyv\xe4rr inte att h\xe4mta informationen."})=>{let u=(0,s.Pj)(),d={title:`${u.getFullTitleName()} | ${e}`,description:`Mina sidor - ${e.toLowerCase()} - ${u.getSiteBaseUrl()}`,image:u.getLogoUrl()};return r?(0,n.jsx)(l.h,{openGraphData:d,children:(0,n.jsx)(a.m,{borderBottom:!0,p:3,pb:0,children:(0,n.jsx)("p",{children:r})})}):(e=>e&&(e.startsWith("http://")||e.startsWith("https://")))(t)?(0,n.jsx)(l.h,{openGraphData:d,children:(0,n.jsx)(i.v,{src:t,name:e,testId:"subscription-service_iframe",initialHeight:"4000px"})}):(0,n.jsx)(l.h,{openGraphData:d,children:(0,n.jsxs)(a.m,{borderBottom:!0,p:3,pb:0,children:[(0,n.jsx)("p",{children:o}),(0,n.jsxs)("p",{children:["G\xe5 tillbaka till"," ",(0,n.jsx)(c.s,{href:"/mina-sidor",children:"mina sidor"})]})]})})},loggedOutText:"Du m\xe5ste vara inloggad f\xf6r att ta del av Mina sidor",loggedOutTitle:"Mina Sidor - Prenumeration"})},35982:(e,t,r)=>{"use strict";r.d(t,{P:()=>n.P});var n=r(59003)},39334:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/mina-sidor/profil",function(){return r(349)}])},59003:(e,t,r)=>{"use strict";r.d(t,{P:()=>n.A});var n=r(56691)},60010:(e,t,r)=>{"use strict";r.d(t,{c:()=>h});var n=r(94513),s=r(43492),i=r(57005),a=r(91544),l=r(11730),c=r(75769),o=r(39154),u=r(15923),d=r(37009);let h=({title:e,text:t})=>{let r=(0,i.Hr)(),l=(0,a.useRouter)().asPath;return(0,n.jsx)(c.wn,{children:(0,n.jsxs)(m,{isMobileApp:r,children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(c.hE,{children:e}),(0,n.jsx)("p",{children:t})]}),(0,n.jsx)(p,{children:r?(0,n.jsx)(s.$n,{variant:"primary",size:"large",onClick:()=>{(0,d.eT)()},children:(0,u.u)("link","login")}):(0,n.jsx)(s.Aj,{variant:"primary",size:"large",href:(0,o.aM)(o.Y0.LOGIN,l),children:(0,u.u)("link","login")})})]})})},m=(0,l.Ay)(c.UC).withConfig({componentId:"sc-672be926-0"})(["",""],({isMobileApp:e})=>
1{if(e)return(0,l.AH)(["height:calc(100vh - 2rem);display:flex;flex-direction:column;justify-content:space-between;"])}),p=(0,l.Ay)(c.eM).withConfig({componentId:"sc-672be926-1"})(["align-self:center;"])},60994:(e,t,r)=>{"use strict";r.d(t,{K:()=>g});var n=r(94513);r(94285);var s=r(10485),i=r(38255),a=r(54020),l=r(9876),c=r(57005),o=r(11730),u=r(35982),d=r(41528),h=r(73478),m=r(60010);let p=(0,o.Ay)(i.m).withConfig({componentId:"sc-26f2c522-0"})([""," min-height:40vh;"],(0,a.xe)({my:3,px:3})),g=({Component:e,loggedOutText:t="Du m\xe5ste vara inloggad f\xf6r att kunna se denna sidan.",loggedOutTitle:r})=>{let i=i=>{let[a,o]=(0,l.DB)(),g=(0,c.Hr)(),{isApp:x}=(0,c.nO)(),f=(0,c.Pj)(),j=`${f.getFullTitleName()} | ${r} | Utloggad`,v=x?(0,n.jsx)(h.a,{isApp:!0}):(0,n.jsx)(m.c,{title:"Logga in",text:t});return a?(0,n.jsx)(e,{...i}):(0,n.jsxs)(n.Fragment,{children:["pending"!==o.status?(0,n.jsx)(d.A,{showTakeoverAd:!1,titleMetaData:{title:j}}):(0,n.jsx)(n.Fragment,{}),(0,n.jsx)(u.P,{fluid:!0,disableFooter:g,children:(0,n.jsx)(p,{children:"pending"===o.status?(0,n.jsx)(s.r,{children:(0,n.jsx)(s.y,{})}):v})})]})};return i.displayName=`withProtectedRoute(${e.displayName||e.name||"Component"})`,i}},63279:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=r(54020),s=r(60930);let i=r(11730).Ay.div.withConfig({componentId:"sc-5cad5c69-0"})([""," "," background-color:",";border-bottom:",";border-top:",";min-height:",";max-width:",";"],n.xe,s.I,({backgroundColor:e="var(--white)"})=>e,({borderBottom:e})=>e?"1px solid rgba(0, 0, 0, 0.075)":"none",({borderTop:e})=>e?"3px solid var(--bg-top-bar)":"none",({minHeight:e})=>e||"none",({maxWidth:e})=>e||"none")},91197:(e,t,r)=>{"use strict";r.d(t,{v:()=>a});var n=r(94513),s=r(94285),i=r(79172);let a=({src:e,name:t,testId:r,titlePrefix:a="",shouldOverrideTitle:l=!1,initialHeight:c="0"})=>
1{let[o,u]=(0,s.useState)(c),[d,h]=(0,s.useState)(!1),[m,p]=(0,s.useState)(""),g=(0,s.useRef)(null),x=(0,s.useCallback)(()=>{if(g?.current?.contentDocument?.body?.clientHeight){h(!0),l&&!m&&p(g.current.contentDocument.title);let e=g.current.contentDocument.body.clientHeight;`${e}px`!==o&&u(`${e}px`)}},[l,m,o]);(0,s.useEffect)(function(){let e,t;return d&&!e&&(e=window.setInterval(()=>{x()},1e3),t=window.setTimeout(()=>clearInterval(e),3e3)),()=>{clearInterval(e),clearTimeout(t)}},[d,x]),(0,s.useEffect)(function(){let e,t=()=>{clearTimeout(e),e=window.setTimeout(()=>x(),500)};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[x]);let f={title:`${a}${m}`};return(0,n.jsxs)(n.Fragment,{children:[l&&(0,n.jsx)(i.A,{titleMetaData:f}),(0,n.jsx)("iframe",{ref:g,title:t,width:"100%",src:e,name:t,id:t,style:{height:o,border:"none"},onLoad:()=>{x()},"data-testid":r})]})}},98122:(e,t,r)=>{"use strict";r.d(t,{By:()=>d,OZ:()=>c,Q2:()=>o,Rm:()=>u});var n=r(94513),s=r(94285),i=r(14493),a=r(57005),l=r(91544);let c=({Component:e,shouldRedirect:t,redirectTo:r="/"})=>
1function(c){let o=(0,a.Pj)(),u=(0,l.useRouter)(),[d,h]=(0,s.useState)(!1),{cmsSettings:m,isLoading:p}=(0,i.m)(o.settingsEtag,o.cmsSettings);(0,s.useEffect)(()=>{p||h(!0)},[p]);let g=t(m);return(0,s.useEffect)(()=>{d&&g&&u.replace(r)},[g,u,d]),d&&!g?(0,n.jsx)(e,{...c}):null},o=e=>!e.admin.webmaster.purchaseflow.purchaseEnabled,u=e=>!e.admin.webmaster.mypages.showMyPages,d=e=>!e.admin.webmaster.mypages.readLater.isActive}},e=>{e.O(0,[1985,5599,1960,1633,2665,4973,640,7318,1482,3864,4314,2463,4440,636,6593,8792],()=>e(e.s=39334)),_N_E=e.O()}]);
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.