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]="4b8503cb-75fe-430c-935c-b7edc2703c87",e._sentryDebugIdIdentifier="sentry-dbid-4b8503cb-75fe-430c-935c-b7edc2703c87")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85],{2064:(e,t,r)=>{"use strict";r.d(t,{z:()=>f});var n=r(2860),i=r(56758),s=r(33080),o=r(83113),a=r(22483),c=r(78004),l=r(49989),u=r(55729),d=r(24827);let p=(0,l.A)([d.Pj]);function f({filter:e,className:t}){let{InvoiceList:r}=(0,a.K8)(),[l,{loading:d}]=(0,o.jp9)(),{data:f,loading:b,error:h}=(0,o.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)(),[w,v,S]=(0,i.S)(),P=(0,u.useMemo)(()=>(0,c.jM)(f,t=>{e&&t?.userInvoices&&(t.userInvoices=e(t.userInvoices))}),[f,e]),I=(0,u.useMemo)(()=>b||d,[b,d]),C=(0,u.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 w(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}})},[w,m]);return(0,n.FD)(n.FK,{children:[(0,n.Y)(s.n,{stripeClientSecret:g??S,redirectPages:y??v}),(0,n.Y)(r,{data:P,loading:I,error:h,className:t,onPay:async e=>{let t=P?.userInvoices?.find(t=>t.id===e);t&&await C(t)}})]})}},3937:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/subscription/[id]",function(){return r(68028)}])},6708:(e,t,r)=>{"use strict";r.d(t,{z:()=>u});var n=r(2860),i=r(31709),s=r(22207),o=r(83113),a=r(22483),c=r(78004),l=r(55729);function u({filter:e,subscribeUrl:t="/mitmachen",className:r}){let[u,p]=(0,l.useState)(),[f,b]=(0,l.useState)(),{SubscriptionList:h}=(0,a.K8)(),{data:m,loading:y,error:g}=(0,o.eLu)(),w=(0,o.QjV)(),[v]=d(),[S]=(0,o.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)):w.refetch()}}),P=(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:[u&&(0,n.Y)(i.O,{clientSecret:u,children:(0,n.Y)(s.G,{onClose:async e=>{f&&(window.location.href=e?f.successPage?.url??"":f.failPage?.url??"")}})}),(0,n.Y)(h,{data:P,loading:y,error:g,invoices:w,subscribeUrl:t,className:r,onCancel:async e=>{await v({variables:{subscriptionId:e}})},onExtend:async e=>{let t=P?.userSubscriptions?.find(t=>t.id===e)?.memberPlan;b(t),await S({variables:{subscriptionId:e,failureURL:t?.failPage?.url,successURL:t?.successPage?.url}})}})]})}let d=(...e)=>(0,o.Exq)({...e[0],update:(e,{data:t},r)=>{let n=t?.cancelUserSubscription;n&&e.updateQuery({query:o.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:()=>s});var n=r(62454),i=r(57067);let s=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}}}},30190:(e,t,r)=>{"use strict";r.d(t,{R:()=>a});var n=r(62454),i=r(83113),s=r(57067),o=r(5441);async function a(e,t,r){if(!e.query.jwt)return!1;try{let{data:o,errors:a}=await t.mutate({mutation:i.u3t,variables:{jwt:e.query.jwt},errorPolicy:"all"});if(a?.length||!o?.createSessionWithJWT){if(a?.some(e=>e.message?.includes("TOTP_REQUIRED")))return!1;return c(e),!1}(0,s.setCookie)(n.K8,JSON.stringify(o.createSessionWithJWT),{req:e.req,res:e.res,expires:new Date(o.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(o.a)}`}),e.res.end())}},35880:(e,t,r)=>{"use strict";r.d(t,{g:()=>d});var n=r(2860),i=r(62454),s=r(18132),o=r(57067),a=r(49897),c=r(81278),l=r(55729);let u=({children:e})=>{let t=(0,c.useRouter)(),{hasUser:r}=(0,i.Jd)();return(r||((0,o.setCookie)(s.V,t.asPath,{expires:(0,a.W)(new Date,{seconds:s.q})}),t.push("/login")),r)?(0,n.Y)(n.FK,{children:e}):(0,n.Y)(l.Fragment,{})},d=e=>function(t){return(0,n.Y)(u,{children:(0,l.createElement)(e,t)})}},52384:(e,t,r)=>{"use strict";function n(){return"https://api-mannschaft.wepublish.cloud"}r.d(t,{e:()=>n})},56758:(e,t,r)=>{"use strict";r.d(t,{S:()=>o,tS:()=>c,yG:()=>a});var n=r(83113),i=r(55729);let s=e=>e.startsWith("http")?e:`${window.location.origin}${e}`,o=(...e)=>{let[t,r]=(0,i.useState)(),[o,a]=(0,i.useState)(),[c]=(0,n.FJY)({...e[0]});return[(0,i.useCallback)(async(e,...t)=>{let n=s(e?.successPage?.url??"/profile"),i=s(e?.failPage?.url??"/profile");return a({successUrl:n,failUrl:i}),c({...t[0],variables:t[0]?.variables?{...t[0].variables,successURL:n,failureURL:i}:void 0,onCompleted:e=>{t[0]?.onCompleted?.(e),l({intent:e.createUserSubscription??void 0,successUrl:n,failUrl:i,setStripeClientSecret:r})},onError:e=>window.location.href=`${i}?error=${encodeURIComponent(e.message)}`})},[c]),o,t]},a=(...e)=>{let[t,r]=(0,i.useState)(),[o,a]=(0,i.useState)(),[c]=(0,n.zMy)({...e[0]});return[(0,i.useCallback)(async(e,...t)=>{let n=s(e?.successPage?.url??"/profile"),i=s(e?.failPage?.url??"/profile");return a({successUrl:n,failUrl:i}),c({...t[0],variables:t[0]?.variables?{...t[0].variables,successURL:n,failureURL:i}:void 0,onCompleted:e=>{t[0]?.onCompleted?.(e),l({intent:e.upgradeUserSubscription??void 0,successUrl:n,failUrl:i,setStripeClientSecret:r})},onError:e=>window.location.href=`${i}?error=${encodeURIComponent(e.message)}`})},[c]),o,t]},c=(...e)=>{let[t,r]=(0,i.useState)(),[s,o]=(0,i.useState)(),[a]=(0,n.oo5)({...e[0]});return[(0,i.useCallback)(async(e,...t)=>{let n=e?.successPage?.url??window.location.origin+"/profile",i=e?.failPage?.url??window.location.origin+"/profile";return o({successUrl:n,failUrl:i}),a({...t[0],variables:t[0]?.variables?{...t[0].variables,successURL:n,failureURL:i}:void 0,onCompleted:e=>{t[0]?.onCompleted?.(e),l({intent:e.createPaymentFromInvoice??void 0,successUrl:n,failUrl:i,setStripeClientSecret:r})},onError:e=>window.location.href=`${i}?error=${encodeURIComponent(e.message)}`})},[a]),s,t]},l=({intent:e,successUrl:t,failUrl:r,setStripeClientSecret:n})=>{if(!e){window.location.href=`${r}?error=${encodeURIComponent("Intent konnte nicht gefunden werden.")}`;return}if("paid"===e.state){window.location.href=t;return}if("stripe"===e.paymentMethod.paymentProviderID)return void n?.(e.intentSecret??void 0);if(n?.(void 0),!e.intentSecret){window.location.href=t;return}if(e.intentSecret.startsWith("http")){window.location.href=e.intentSecret;return}}},68028:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(2860),i=r(25527),s=r(81278),o=r(35880);r(42273),r(7972),r(30190);var a=r(83113),c=r(85611),l=r(6708),u=r(2064),d=r(22483),p=r(29733);r(52384),r(29143);let f=(0,i.A)(c.HD,{target:"e1hfloz00"})("display:grid;gap:",({theme:e})=>e.spacing(3),";",({theme:e})=>e.breakpoints.up("md"),"{grid-template-columns:1fr 1fr;gap:",({theme:e})=>e.spacing(10),";& > *{grid-column:unset;}}"),b=(0,i.A)("div",{target:"e1hfloz01"})("display:flex;flex-flow:column;gap:",({theme:e})=>e.spacing(2),";"),h=(0,o.g)(function(){let{query:{id:e}}=(0,s.useRouter)(),{elements:{H4:t}}=(0,d.K8)(),{t:r}=(0,p.Bd)(),{data:i}=(0,a.eLu)({fetchPolicy:"cache-only"}),o=i?.userSubscriptions.find(t=>
1t.id===e);return(0,n.FD)(f,{children:[(0,n.FD)(b,{children:[(0,n.Y)(t,{component:"h1",children:r("user.subscriptionsDetail",{type:o?.memberPlan.productType})}),(0,n.Y)(l.z,{filter:t=>t.filter(t=>t.id===e)})]}),(0,n.FD)(b,{children:[(0,n.Y)(t,{component:"h1",children:"Rechnungen"}),(0,n.Y)(u.z,{filter:t=>t.filter(t=>t.subscriptionID===e)})]}),(0,n.Y)(d.N_,{href:"/profile",children:"Zur\xfcck zum Profil"})]})});h.getInitialProps=async e=>({});let m=h}},e=>{e.O(0,[4,636,593,792],()=>e(e.s=3937)),_N_E=e.O()}]); 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cea6db12-ca7f-5092-a498-8743cee748c7")}catch(e){}}(); 3//# debugId=cea6db12-ca7f-5092-a498-8743cee748c7
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.