1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ab99f134-749d-42c1-b194-712a4b9732bb",e._sentryDebugIdIdentifier="sentry-dbid-ab99f134-749d-42c1-b194-712a4b9732bb")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63],{6708:(e,t,r)=>{"use strict";r.d(t,{z:()=>d});var n=r(2860),i=r(31709),a=r(22207),s=r(22626),o=r(89441),c=r(78004),l=r(55729);function d({filter:e,subscribeUrl:t="/mitmachen",className:r}){let[d,p]=(0,l.useState)(),[h,f]=(0,l.useState)(),{SubscriptionList:b}=(0,o.K8)(),{data:m,loading:y,error:g}=(0,s.eLu)(),v=(0,s.QjV)(),[w]=u(),[S]=(0,s.sge)({onCompleted(e){e.extendUserSubscription?.intentSecret?("stripe"===e.extendUserSubscription.paymentMethod.paymentProviderID&&p(e.extendUserSubscription.intentSecret),e.extendUserSubscription.intentSecret.startsWith("http")&&(window.location.href=e.extendUserSubscription.intentSecret)):v.refetch()}}),Y=(0,l.useMemo)(()=>(0,c.jM)(m,t=>{e&&t?.userSubscriptions&&(t.userSubscriptions=e(t.userSubscriptions))}),[m,e]);return(0,n.FD)(n.FK,{children:[d&&(0,n.Y)(i.O,{clientSecret:d,children:(0,n.Y)(a.G,{onClose:async e=>{h&&(window.location.href=e?h.successPage?.url??"":h.failPage?.url??"")}})}),(0,n.Y)(b,{data:Y,loading:y,error:g,invoices:v,subscribeUrl:t,className:r,onCancel:async e=>{await w({variables:{subscriptionId:e}})},onExtend:async e=>{let t=Y?.userSubscriptions?.find(t=>t.id===e)?.memberPlan;f(t),await S({variables:{subscriptionId:e,failureURL:t?.failPage?.url,successURL:t?.successPage?.url}})}})]})}let u=(...e)=>(0,s.Exq)({...e[0],update:(e,{data:t},r)=>{let n=t?.cancelUserSubscription;n&&e.updateQuery({query:s.yeQ},e=>({userInvoices:e?.userInvoices.map(e=>e.subscriptionID!==n.id||e.paidAt||e.canceledAt?e:{...e,subscription:n,canceledAt:new Date().toISOString()})??[]}))}})},7972:(e,t,r)=>{"use strict";r.d(t,{C:()=>a});var n=r(62454),i=r(57067);let a=async e=>{try{let t=await (0,i.getCookie)(n.K8,{req:e.req});return{sessionToken:t?JSON.parse(t.toString()):null}}catch(t){return console.error(t),(0,i.deleteCookie)(n.K8,{req:e.req}),{sessionToken:null}}}},18081:(e,t,r)=>{"use strict";r.d(t,{L:()=>l});var n=r(2860),i=r(67532),a=r(61264),s=r(22626),o=r(89441),c=r(18019);function l({id:e,slug:t,className:r,children:l}){let{Page:d}=(0,o.K8)(),{data:u,loading:p,error:h}=(0,s.Nuq)({variables:{id:e,slug:t}});return(0,n.Y)(i.w,{children:(0,n.FD)(a.b,{children:[(0,n.Y)(c.U,{documentId:u?.page?.id,documentType:s.ank.Page}),(0,n.Y)(d,{data:u,loading:p,error:h,className:r,children:l})]})})}},30190:(e,t,r)=>{"use strict";r.d(t,{R:()=>o});var n=r(62454),i=r(22626),a=r(57067),s=r(5441);async function o(e,t,r){if(!e.query.jwt)return!1;try{let{data:s,errors:o}=await t.mutate({mutation:i.u3t,variables:{jwt:e.query.jwt},errorPolicy:"all"});if(o?.length||!s?.createSessionWithJWT){if(o?.some(e=>e.message?.includes("TOTP_REQUIRED")))return!1;return c(e),!1}(0,a.setCookie)(n.K8,JSON.stringify(s.createSessionWithJWT),{req:e.req,res:e.res,expires:new Date(s.createSessionWithJWT.expiresAt),sameSite:"strict",secure:!0,httpOnly:!!r})}catch{return c(e),!1}return!0}function c(e){e.res&&!e.res.headersSent&&(e.res.writeHead(302,{Location:`/login?error=${encodeURIComponent(s.a)}`}),e.res.end())}},35880:(e,t,r)=>{"use strict";r.d(t,{g:()=>u});var n=r(2860),i=r(62454),a=r(18132),s=r(57067),o=r(49897),c=r(81278),l=r(55729);let d=({children:e})=>{let t=(0,c.useRouter)(),{hasUser:r}=(0,i.Jd)();return(r||((0,s.setCookie)(a.V,t.asPath,{expires:(0,o.W)(new Date,{seconds:a.q})}),t.push("/login")),r)?(0,n.Y)(n.FK,{children:e}):(0,n.Y)(l.Fragment,{})},u=e=>function(t){return(0,n.Y)(d,{children:(0,l.createElement)(e,t)})}},41310:(e,t,r)=>{"use strict";r.d(t,{z:()=>h});var n=r(2860),i=r(56758),a=r(33080),s=r(22626),o=r(89441),c=r(78004),l=r(61813),d=r(55729),u=r(24827);let p=(0,l.G)([u.Pj]);function h({filter:e,className:t}){let{InvoiceList:r}=(0,o.K8)(),[l,{loading:u}]=(0,s.jp9)(),{data:h,loading:f,error:b}=(0,s.QjV)({onCompleted(e){for(let{id:t,paidAt:r,canceledAt:n}of e.userInvoices)r||n||l({variables:{id:t}})}}),[m,y,g]=(0,i.tS)(),[v,w,S]=(0,i.S)(),Y=(0,d.useMemo)(()=>(0,c.jM)(h,t=>
1{e&&t?.userInvoices&&(t.userInvoices=e(t.userInvoices))}),[h,e]),k=(0,d.useMemo)(()=>f||u,[f,u]),x=(0,d.useCallback)(async e=>{let t=e.subscription,r=t?.memberPlan;if(p(e)){let n=(e=>{if(e.subscription?.paymentMethod&&"payrexx-subscription"===e.subscription.paymentMethod.paymentProviderID)return"payrexx"})(e),i=r.availablePaymentMethods.flatMap(({paymentMethods:e})=>e).find(({paymentProviderID:e})=>e===n)?.id;if(!i)throw Error("Der ben\xf6tigte Payment-Adapter konnte nicht gefunden werden.");return v(r,{variables:{deactivateSubscriptionId:t.id,memberPlanId:r?.id,paymentMethodId:i,autoRenew:t.autoRenew,monthlyAmount:t?.monthlyAmount,paymentPeriodicity:t?.paymentPeriodicity}})}return m(r,{variables:{invoiceId:e.id,paymentMethodId:t.paymentMethod.id}})},[v,m]);return(0,n.FD)(n.FK,{children:[(0,n.Y)(a.n,{stripeClientSecret:g??S,redirectPages:y??w}),(0,n.Y)(r,{data:Y,loading:k,error:b,className:t,onPay:async e=>{let t=Y?.userInvoices?.find(t=>t.id===e);t&&await x(t)}})]})}},56308:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile",function(){return r(83429)}])},83429:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(2860),i=r(85611),a=r(18081),s=r(25527),o=r(83004),c=r(10945),l=r(41310),d=r(23500),u=r(8008),p=r(6708),h=r(20042),f=r(62454),b=r(22626),m=r(89441),y=r(55729);function g({className:e,schema:t,fields:r}){let{PersonalDataForm:i}=(0,m.K8)(),{user:a}=(0,f.Jd)(),[s]=(0,b.dSE)(),[o]=(0,b.zod)(),[c]=(0,b.H7G)(),[l]=(0,b.Oye)(),d=(0,y.useCallback)(async e=>{e&&await s({variables:{file:e.target?.files[0],focalPointX:.5,focalPointY:.5}})},[s]),u=(0,y.useCallback)(async e=>{let{password:t,passwordRepeated:r,...n}=e,i=[c({variables:n})];t&&r&&i.push(o({variables:{password:t,passwordRepeated:r}})),await Promise.all(i)},[o,c]),p=(0,y.useCallback)(async e=>{await l({variables:{newEmail:e}})},[l]);return a?(0,n.Y)(i,{className:e,user:a,onImageUpload:d,onUpdate:u,onRequestEmailChange:p,fields:r,schema:t}):null}var v=r(29733),w=r(75894),S=r.n(w);let Y=(0,s.A)("div",{target:"e13n02k20"})("display:flex;justify-content:center;& > div{border-radius:16px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,0.08);}");function k({uri:e}){let t=(0,y.useRef)(null),r=(0,y.useMemo)(()=>new(S())({width:240,height:240,type:"svg",data:e,margin:10,image:"/_next/static/media/wepublish-mark.6228eaa9.png",qrOptions:{errorCorrectionLevel:"H"},dotsOptions:{type:"extra-rounded",color:"#000000"},cornersSquareOptions:{type:"extra-rounded",color:"#000000"},cornersDotOptions:{type:"dot",color:"#000000"},backgroundOptions:{color:"#ffffff"},imageOptions:{margin:0,imageSize:.4,hideBackgroundDots:!0}}),[e]);return(0,y.useEffect)(()=>{let e=t.current;e&&(e.innerHTML="",r.append(e))},[r]),(0,n.Y)(Y,{children:(0,n.Y)("div",{ref:t,"data-sentry-block":!0})})}let x=(0,s.A)("div",{target:"esu65p60"})("display:grid;gap:",({theme:e})=>e.spacing(2),";max-width:600px;"),D=(0,s.A)("code",{target:"esu65p61"})("display:block;text-align:center;font-size:14px;padding:",({theme:e})=>e.spacing(1),";background:",({theme:e})=>e.palette.grey[100],";border-radius:4px;word-break:break-all;"),C=(0,s.A)("p",{target:"esu65p62"})("font-size:13px;color:",({theme:e})=>e.palette.text.secondary,";a{color:",({theme:e})=>e.palette.primary.main,";text-decoration:none;&:hover{text-decoration:underline;}}");function P({className:e,totpEnabled:t,onSetup:r,onEnable:i}){let{elements:{TextField:a,Alert:s,Button:o,H5:c}}=(0,m.K8)(),{t:l}=(0,v.Bd)(),[d,u]=(0,y.useState)(!1),[p,h]=(0,y.useState)(""),[f,b]=(0,y.useState)(""),[g,w]=(0,y.useState)(""),[S,Y]=(0,y.useState)(!1),[P,I]=(0,y.useState)(),[E,A]=(0,y.useState)(!1);async function _(){Y(!0),I(void 0);try{let e=await r();e&&(h(e.uri),b(e.secret),u(!0))}catch(e){I(e?.message||l("user.totp.setupError"))}finally{Y(!1)}}async function F(){Y(!0),I(void 0);try{await i(g)&&(A(!0),u(!1))}catch(e){I(e?.message||l("user.totp.invalidCode")),w("")}finally{Y(!1)}}return t||E?(0,n.FD)(x,{className:e,children:[(0,n.Y)(c,{children:l("user.totp.title")}),(0,n.Y)(s,{severity:"success",children:l("user.totp.enabled")})]}):d?(0,n.FD)(x,{className:e,children:[(0,n.Y)(c,{children:l("user.totp.title")}),(0,n.Y)(s,{severity:"info",children:l("user.totp.setupDescription")}),(0,n.FD)(C,{children:[l("user.totp.downloadApp")," ",(0,n.Y)("a",{href:"https://play.google.com/store/apps/details?id=proton.android.authenticator",target:"_blank",rel:"noopener noreferrer",children:"Android"})," | ",(0,n.Y)("a",{href:"https://apps.apple.com/app/proton-authenticator/id6741758667",target:"_blank",rel:"noopener noreferrer",children:"iOS"})]}),(0,n.Y)(s,{severity:"warning",children:l("user.totp.backupHint")}),p&&(0,n.Y)(k,{uri:p}),f&&(0,n.FD)(n.FK,{children:[(0,n.Y)(s,{severity:"info",children:l("user.totp.manualEntry")}),(0,n.Y)(D,{"data-sentry-mask":!0,children:f})]}),(0,n.Y)(a,{value:g,onChange:e=>w(e.target.value),autoComplete:"one-time-code",fullWidth:!0,label:l("user.totp.code")}),P&&(0,n.Y)(s,{severity:"error",children:P}),(0,n.Y)(o,{disabled:S||!g,onClick:F,type:"button",children:l("user.totp.activate")})]}):(0,n.FD)(x,{className:e,children:[(0,n.Y)(c,{children:l("user.totp.title")}),(0,n.Y)(s,{severity:"info",children:l("user.totp.optionalDescription")}),P&&(0,n.Y)(s,{severity:"error",children:P}),(0,n.Y)(o,{disabled:S,onClick:_,type:"button",children:l("user.totp.setup")})]})}function I({className:e}){let{user:t}=(0,f.Jd)(),[r]=(0,b.KuD)(),[i]=(0,b.ZKU)(),a=(0,y.useCallback)(async()=>{let e=await r();return e.data?.generateTotpSetup?{uri:e.data.generateTotpSetup.uri,secret:e.data.generateTotpSetup.secret}:null},[r]),s=(0,y.useCallback)(async e=>{let t=await i({variables:{totpToken:e}});return!!t.data?.enableTotp},[i]);return t?(0,n.Y)(P,{className:e,totpEnabled:t.totpEnabled,onSetup:a,onEnable:s}):null}var E=r(81278);r(30190);var A=r(35880);r(42273),r(7972),r(52384);let _=(0,s.A)("div",{target:"ef6p20f0"})("display:flex;flex-wrap:wrap;justify-content:center;gap:",({theme:e})=>e.spacing(3),";",({theme:e})=>(0,o.AH)` 2 ${e.breakpoints.up("md")} { 3 flex-wrap: nowrap; 4 gap: ${e.spacing(10)}; 5 } 6 `),F=(0,s.A)("div",{target:"ef6p20f1"})("display:flex;flex-flow:column;width:100%;gap:",({theme:e})=>e.spacing(2),";",({theme:e})=>(0,o.AH)` 7 ${e.breakpoints.up("md")} { 8 width: 50%; 9 } 10 `),T=(0,s.A)(l.z,{target:"ef6p20f2"})(d.YK,"{border-width:4px;border-color:",({theme:e})=>e.palette.error.main,";}"),N=(0,s.A)("div",{target:"ef6p20f3"})("display:grid;justify-content:center;"),K=(0,s.A)(i.HD,{target:"ef6p20f4"})("gap:",({theme:e})=>e.spacing(2),";"),q=(0,A.g)(function({className:e,...t}){let{elements:{H4:r,Alert:i}}=(0,m.K8)(),{t:a}=(0,v.Bd)(),s=(0,E.useRouter)(),o=(0,c.m)(),[l,{data:d,error:f}]=(0,b.p7P)();(0,y.useEffect)(()=>{let e=s.query.confirmEmailChange;
10if(e){let{confirmEmailChange:t,jwt:r,...n}=s.query;l({variables:{newEmail:e}}).then(async()=>{await s.replace({pathname:"/profile",query:n},void 0,{shallow:!0}),await o.refetchQueries({include:["Me"]})}).catch(async()=>{await s.replace({pathname:"/profile",query:n},void 0,{shallow:!0})})}},[s.query.confirmEmailChange,l,s]);let{data:w}=(0,b.eLu)({fetchPolicy:"cache-only"}),S=w?.userSubscriptions.some(e=>e.deactivation),Y=w?.userSubscriptions.some(e=>!e.deactivation&&e.memberPlan.productType===b.chg.Subscription),k=w?.userSubscriptions.some(e=>!e.deactivation&&e.memberPlan.productType===b.chg.Donation),x=(0,u.B)();return(0,n.FD)(n.FK,{children:[d&&(0,n.Y)(i,{severity:"success",children:a("user.emailChangeConfirmed")}),f&&(0,n.Y)(i,{severity:"error",children:f.message}),(0,n.FD)(_,{className:e,children:[x&&(0,n.FD)(F,{children:[(0,n.Y)(r,{component:"h1",children:a("invoice.openInvoices")}),(0,n.Y)(T,{filter:e=>e.filter(e=>e.subscription&&!e.canceledAt&&!e.paidAt)})]}),(0,n.FD)(F,{children:[(0,n.Y)(r,{component:"h1",children:a("user.activeSubscriptions",{type:b.chg.Subscription})}),(0,n.Y)(p.z,{filter:e=>e.filter(e=>!e.deactivation&&e.memberPlan.productType===b.chg.Subscription)}),k&&(0,n.FD)(n.FK,{children:[(0,n.Y)(r,{component:"h2",children:a("user.activeSubscriptions",{type:b.chg.Donation})}),(0,n.Y)(p.z,{filter:e=>e.filter(e=>!e.deactivation&&e.memberPlan.productType===b.chg.Donation)})]}),Y&&(0,n.Y)(h.kc,{children:(0,n.Y)(h.K8,{children:(0,n.Y)(m.$n,{LinkComponent:m.N_,href:"/mitmachen",children:a("user.subscribeAnother")})})}),S&&(0,n.Y)(N,{children:(0,n.Y)(m.N_,{href:"/profile/subscription/deactivated",children:a("user.viewCancelledSubscriptions")})})]})]}),(0,n.FD)(K,{className:e,children:[(0,n.Y)(r,{component:"h1",children:a("navbar.profile")}),(0,n.Y)(g,{...t}),(0,n.Y)(I,{})]})]})});q.getInitialProps=async e=>({});var M=r(6119);function O(){return(0,n.Y)(a.L,{slug:"profile",children:(0,n.Y)(M.f,{children:(0,n.Y)(i.DE,{fullWidth:!0,children:(0,n.Y)(q,{})})})})}O.getInitialProps=async e=>({})}},e=>{e.O(0,[642,894,636,593,792],()=>e(e.s=56308)),_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.