1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];if(null!=a)for(var r in a)a.hasOwnProperty(r)&&(e[r]=a[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:dpg-media-services-csa":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b142c4e0-2c6b-47cd-a499-3ff39f259c2e",e._sentryDebugIdIdentifier="sentry-dbid-b142c4e0-2c6b-47cd-a499-3ff39f259c2e")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[188],{2869:(e,t,a)=>{"use strict";a.d(t,{r:()=>o});var r=a(6029),n=a(55729),i=a(57490),s=a(89456),d=a(82203),l=a.n(d),c=a(59036);function o({className:e,routes:t}){let a=(0,c.U)(),d=function(e=[]){return(0,n.useMemo)(()=>e.map((e,t,a)=>t===a.length-1?{label:e.label??"-"}:{label:e.label??"-",...e.route?{path:e.route}:{}}),[e])}(t??[]);return!d.length||a.hasWebviewLimitation?null:(0,r.jsx)(s.rX,{className:(0,i.cx)("container mx-auto desktop:pt-6 tablet:pt-4 pt-3 flex items-baseline space-x-[0.25rem]",e),items:d,as:(0,r.jsx)(l(),{href:""})})}},13860:(e,t,a)=>{"use strict";a.d(t,{l:()=>s});var r=a(6029);a(55729);var n=a(89456),i=a(43343);let s=({loading:e,children:t,...a})=>{let{getTranslation:s}=(0,i.c3)();return(0,r.jsx)(n.$n,{...a,disabled:a.disabled||e,children:e?(0,r.jsx)(n.fV,{"aria-label":s("isLoadingAriaLabel"),className:"brightness-0"}):t})}},13873:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/betaalservice/wijzigen/[brand_id]/[subscription_id]",function(){return a(89145)}])},33385:(e,t,a)=>{"use strict";a.d(t,{K:()=>h});var r=a(6029);a(55729);var n=a(25802),i=a(95618),s=a(46636),d=a(50092),l=a(79132),c=a(59867),o=a(55597),u=a(57490),m=a(89456);let p=({logoUrl:e,title:t,onRemove:a,isRemovable:n,withPadding:i})=>(0,r.jsxs)("li",{className:(0,u.cx)("flex-none relative group",n&&"cursor-pointer"),"data-testid":"selected-subscription",onClick:n?a:()=>{},children:[n&&(0,r.jsx)("div",{className:"invisible group-hover:visible",children:(0,r.jsx)(m.In,{icon:o.s0Q,className:"absolute -top-1 -right-1 bg-white overflow-hidden rounded-full text-gray-dark"})}),(0,r.jsx)("div",{className:"overflow-hidden rounded-xl w-10 h-10 border border-gray-medium",children:e?(0,r.jsx)("img",{src:e,className:(0,u.cx)("w-full h-full",i&&"p-1"),title:t||""}):(0,r.jsx)("div",{className:"w-full h-full bg-gray-light"})})]}),h=({activeItems:e,onRemove:t,...a})=>{let{dpgConfig:o}=(0,n.G)(),u=a.subscriptions.map(e=>(0,d.ni)(s.B,e)),m=(0,l.Ek)(),h=u.filter(({subscriptionKey:t,lowerCaseBrandId:a})=>!!e.includes("magazines")&&"magazine"===m[a].brandCategory||e.includes(t)),b=void 0!==t&&e.length>1,x=b?t:()=>null;return(0,r.jsxs)("ul",{className:"flex gap-1 py-2 max-w-full flex-wrap","data-testid":"selected-subscriptions",children:[h.map(e=>{let t=e.brand.toLowerCase();if(!(0,c.e)(t,m))return null;let a=m[t],n=(0,i.d)(a.subscriptionLogo)?.height(50).url(),s=e.pcsProduct?.descriptor?.name||a.seoTitle;return(0,r.jsx)(p,{logoUrl:n,title:s,onRemove:()=>x(e.subscriptionKey),isRemovable:b},e.subscriptionKey)}
1),e.includes("account")&&(0,r.jsx)(p,{title:"DPG Media Account",onRemove:()=>x("account"),logoUrl:(0,i.d)(o.dpgHeaderLogo)?.url(),withPadding:!0,isRemovable:b})]})}},46636:(e,t,a)=>{"use strict";a.d(t,{B:()=>r});let r=(0,a(50092).UG)(` 2 fragment SelectedItem on S2LinkedSubscription { 3 subscriptionKey 4 lowerCaseBrandId 5 brand 6 pcsProduct { 7 descriptor { 8 name 9 } 10 } 11 } 12`)},47466:(e,t,a)=>{"use strict";a.d(t,{ez:()=>s,wF:()=>n,yx:()=>i});var r=a(55729);let n=(0,r.createContext)([]),i=()=>(0,r.useContext)(n),s=e=>{let t=i();return t?.find(t=>t.iso2Code===e)}},50189:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var r=a(6029);a(55729);var n=a(89456),i=a(71024),s=a.n(i),d=a(81278),l=a(15615),c=a(43343);let o=s()(()=>Promise.all([a.e(3957),a.e(5330)]).then(a.bind(a,95330)),{loadableGenerated:{webpack:()=>[95330]},loading:()=>(0,r.jsx)("div",{style:{width:"300px",height:"250px"}}),ssr:!1});function u(){let{getTranslation:e,getPortableText:t}=(0,c.c3)(),{push:a}=(0,d.useRouter)();return(0,r.jsxs)("div",{className:"text-center","data-testid":"error-page-404",children:[(0,r.jsx)("div",{className:"mt-8 inline-block","data-testid":"error-text-404",children:(0,r.jsx)(o,{src:"/animations/404.lottie",autoplay:!0,loop:!0,style:{width:"300px",height:"250px"}})}),(0,r.jsx)("div",{className:"flex flex-col text-center bg-white py-8 px-4",children:(0,r.jsxs)("div",{className:"max-w-xl mx-auto space-y-4 tablet:space-y-6",children:[(0,r.jsx)(l.A,{className:"text-xl font-bold",message:t("errorDescription404")}),(0,r.jsx)(n.$n,{variant:"primary",onClick:()=>{a("/account")},"data-testid":"back-to-account",children:e("errorBackButtonLabel404")})]})})]})}},69591:(e,t,a)=>{"use strict";a.d(t,{n:()=>i.nD,b:()=>d});var r=a(6029),n=a(55729),i=a(89456),s=a(18654);let d=function({className:e,children:t,...a}){let d=(0,n.useRef)(a.defaultValue||[]),{pushAnalyticsEvent:l}=(0,s.iK)();return(0,r.jsx)(i.nD.Root,{onValueChange:e=>{var t;let a=(t=d.current,t.filter(t=>!e.includes(t)).concat(e.filter(e=>!t.includes(e))));l({event:"clicks",click_type:e.length>d.current.length?"click_unfold":"click_fold",click_element:a.join(", ")}),d.current=e},type:"multiple",...a,children:t})}},78504:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var r=a(6029),n=a(55729),i=a(1699),s=a(89456),d=a(71024),l=a.n(d),c=a(81278),o=a(15615),u=a(43343);let m=l()(()=>Promise.all([a.e(3957),a.e(5330)]).then(a.bind(a,95330)),{loadableGenerated:{webpack:()=>[95330]},loading:()=>(0,r.jsx)("div",{style:{width:"300px",height:"250px"}}),ssr:!1});function p({error:e,traceId:t}){let{getTranslation:a,getPortableText:d}=(0,u.c3)(),{pathname:l,push:h,reload:b}=(0,c.useRouter)();return(0,n.useEffect)(()=>{if(window.location){let a=new URLSearchParams(window.location.search);"forbidden"===a.get("error")&&a.has("reason")||(0,i.c_)(e||Error("[500] Internal server error"),{extra:{traceId:t,href:window.location.href}})}},[t,e]),(0,r.jsxs)("div",{className:"text-center","data-testid":"error-page-500",children:[(0,r.jsx)("div",{className:"mt-8 inline-block",children:(0,r.jsx)(m,{src:"/animations/500.lottie",autoplay:!0,loop:!0,style:{width:"300px",height:"250px"}})}),(0,r.jsx)("div",{className:"flex flex-col text-center bg-white py-8 px-4",children:(0,r.jsxs)("div",{className:"max-w-xl mx-auto space-y-4 tablet:space-y-6",children:[(0,r.jsx)(o.A,{className:"text-xl font-bold",message:d("errorDescription")}),"/500"===l?(0,r.jsx)(s.$n,{variant:"primary",onClick:()=>{h("/account")},children:a("errorBackButtonLabel404")}):(0,r.jsx)(s.$n,{variant:"primary",onClick:()=>{b()},children:a("errorRetryButtonLabel")}),t&&(0,r.jsxs)("span",{"data-testid":"error-trace-id",className:"pt-4 font-monospace block text-gray-dark",children:[a("errorTraceIdLabel")," ",t]})]})})]})}},89145:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>R,default:()=>D});var r=a(6029),n=a(55729),i=a(2869),s=a(89456),d=a(81278),l=a(50189),c=a(78504),o=a(237),u=a(76407),m=a(43343),p=a(55597),h=a(57490),b=a(69591),x=a(18654),g=a(79132),y=a(50197),f=a(50092);let C=(0,f.UG)(` 13 mutation ChangePaymentToCreditCard($input: ChangePaymentToCreditCardInput!) { 14 changePaymentToCreditCard(input: $input) { 15 changePaymentRequestId 16 paymentValidationUrl 17 } 18 } 19`);var v=a(13860);let j=(0,f.UG)(` 20 fragment ChangePaymentCreditCardForm on S2LinkedSubscription {
21 ...CreditCardAccordionItem 22 lowerCaseBrandId 23 subscriptionId 24 } 25`),w=e=>{let{isRetry:t}=e,a=(0,f.ni)(j,e.subscription),{getFeatureFlag:i}=(0,u.h)(),{getTranslation:d}=(0,m.c3)(),{pushAnalyticsEvent:l}=(0,x.iK)(),[c,g]=(0,n.useState)([]);return(0,n.useEffect)(()=>{l({event:"screenview",steps:3,step_description:"choose payment method",funnel_name:"change creditcard payment",screen_name:window.location.pathname,retry:t})},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{className:"font-semibold",children:d("changeCreditcardPaymentFormCreditcardSelectPaymentHeading")}),(0,r.jsx)("div",{className:"flex flex-col gap-2","data-testid":"change-payment-form",children:(0,r.jsxs)(b.b,{value:c,children:[(i("general","isChangePaymentDirectDebitNLEnabled")||i("general","isChangePaymentDirectDebitBEEnabled"))&&(0,r.jsx)(o.N,{href:"/betaalservice/wijzigen","data-testid":"change-payment-direct-debit-link",className:"w-full text-left font-semibold min-h-14 max-w-lg mx-auto bg-white border border-gray-medium py-[0.875rem] px-4 rounded-sm flex flex-row items-center cursor-pointer appearance-none",children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"font-semibold flex items-center gap-2",children:d("changeCreditcardPaymentPagePaymentType_DIRECT_DEBIT")}),(0,r.jsx)(s.In,{icon:p.XkK,fixedWidth:!0,className:"text-icon max-h-[16px] ml-auto"})]})}),i("general","isChangePaymentCreditCardEnabled")&&(0,r.jsx)(N,{activeValue:c,toggleActiveValue:e=>{g(t=>(0,h.Eo)(t,e))},subscription:a})]})})]})},P=(0,f.UG)(` 26 fragment CreditCardAccordionItem on S2LinkedSubscription { 27 lowerCaseBrandId 28 subscriptionId 29 } 30`);function N({activeValue:e,toggleActiveValue:t,subscription:a}){let i=(0,f.ni)(P,a),{changeCreditCardPayment:l,loading:c,error:o}=(()=>{let{push:e}=(0,d.useRouter)(),t=(0,g.PB)(),[{fetching:a,error:r},i]=(0,y.n_)(C),s=(0,h.hC)();return{changeCreditCardPayment:(0,n.useCallback)(async({subscription:a,creditCardProvider:r})=>{let n=await i({input:{baseRedirectUrl:`${s}/betaalservice/wijzigen/status/creditcard`,countryCode:t.brandCountry.toUpperCase(),creditCardProvider:r,subscription:{brandId:a.brand,subscriptionId:a.subscriptionId}}});n.data?.changePaymentToCreditCard?.paymentValidationUrl&&e(n.data.changePaymentToCreditCard?.paymentValidationUrl)},[i,s,t.brandCountry,e]),loading:a,error:r}})(),{getTranslation:u}=(0,m.c3)(),{getErrorTranslation:x}=(0,m.YY)(),[j,w]=(0,n.useState)(),I=(0,n.useCallback)(()=>j?l({subscription:{brand:i.lowerCaseBrandId,subscriptionId:i.subscriptionId},creditCardProvider:j}):null,[j,l,i]),_="creditCardAccordionItem",k=[{value:"VISA",label:u("changeCreditcardPaymentPageCreditCardType_VISA")},{value:"MASTERCARD",label:u("changeCreditcardPaymentPageCreditCardType_MASTERCARD")}];return(0,r.jsxs)(b.n.Item,{value:_,"data-testid":"credit-card-accordion-item",children:[(0,r.jsx)(b.n.Trigger,{onClick:()=>{t(_)},id:_,children:(0,r.jsxs)("div",{className:"flex flex-row items-center gap-3 -my-2",children:[(0,r.jsx)("div",{className:"overflow-hidden rounded-xl w-8 h-8 border border-gray-medium",children:(0,r.jsx)("img",{className:"w-full h-full",src:"/images/creditcard.svg",alt:""})}),(0,r.jsx)("span",{className:"font-semibold",children:u("changeCreditcardPaymentPagePaymentType_CREDIT_CARD")})]})}),(0,r.jsx)(b.n.Content,{forceMount:!0,hidden:!e.includes(_),children:(0,r.jsxs)("div",{className:"flex flex-col gap-2 mt-2",children:[(0,r.jsx)(s.qF,{hideRequiredIndicator:!0,className:"py-2",testId:"credit-card-type",items:k,initialSelectedItem:k.find(({value:e})=>e===j),keyField:"value",labelField:"label",placeholder:u("changeCreditcardPaymentFormChooseCountryPlaceholder"),onChange:e=>w(e.value)}),(0,r.jsxs)("div",{className:"text-xs flex items-top",role:"complementary",children:[(0,r.jsx)(s.In,{icon:p.iW_,className:"text-icon mr-1 mt-0.5"}),(0,r.jsx)("span",{children:u("changeCreditcardPaymentPageInfoMessage_CREDIT_CARD")})]}),(0,r.jsxs)("div",{className:"flex flex-col mt-2",children:[o&&(0,r.jsx)(s.Eg,{"data-testid":"change-payment-error-notification",variant:"error",className:"mb-4",shouldAnnounce:!1,children:x("GENER
30IC-ERROR")}),(0,r.jsx)(v.l,{type:"submit",variant:"primary",className:"grow","data-testid":"continue-payment",disabled:!j,loading:c,onClick:I,children:u("changeCreditcardPaymentFormNextButtonLabel")})]})]})})]},_)}var I=a(33385);let _=(0,f.UG)(` 31 query ChangePaymentCreditCardSubscription( 32 $brandId: String! 33 $subscriptionId: String! 34 ) { 35 changePaymentCreditCardSubscription: getLinkedSubscription( 36 brandId: $brandId 37 subscriptionId: $subscriptionId 38 ) { 39 ...SelectedItem 40 ...ChangePaymentCreditCardForm 41 subscriptionKey 42 canonicalSubscription { 43 paymentOption { 44 paymentMethod 45 } 46 } 47 } 48 } 49`),k=()=>{let{push:e,query:t}=(0,d.useRouter)(),{getFeatureFlag:a}=(0,u.h)(),{getTranslation:i}=(0,m.c3)(),{getErrorTranslation:p}=(0,m.YY)(),[{data:h,fetching:b,error:x}]=(0,y.IT)({query:_,variables:{brandId:t.brand_id,subscriptionId:t.subscription_id}});(0,n.useEffect)(()=>{h&&h.changePaymentCreditCardSubscription?.canonicalSubscription.paymentOption?.paymentMethod!=="CREDIT_CARD"&&(a("general","isChangePaymentDirectDebitNLEnabled")||a("general","isChangePaymentDirectDebitBEEnabled"))&&e("/betaalservice/wijzigen")},[h]);let g=!b&&!h?.changePaymentCreditCardSubscription;if(x)return(0,r.jsx)(c.A,{error:x});if(g)return(0,r.jsx)(l.A,{});if(!h?.changePaymentCreditCardSubscription)return(0,r.jsx)("div",{className:"bg-white text-center py-12","data-testid":"loading-subscriptions",children:(0,r.jsx)(s.fV,{"aria-label":i("changeCreditcardPaymentPageLoadingSubscriptionAriaLabel")})});let f="string"==typeof t.retryReason?p(t.retryReason):void 0;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"max-w-md w-full mx-auto pt-5 tablet:pt-4 px-3 mb-4 flex flex-col text-center gap-6",children:[(0,r.jsx)(s.gj,{variant:"row",steps:[{id:"step-1",label:i("changeCreditcardPaymentPageStep1Label"),status:"completed"},{id:"step-2",label:i("changeCreditcardPaymentPageStep2Label"),status:"active"}]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"heading-4 font-bold mb-1",children:i(f?"changeCreditcardPaymentPageErrorResultTitle":"changeCreditcardPaymentCreditCardPageTitle")}),!f&&(0,r.jsx)("span",{children:i("changeCreditcardPaymentPageCreditCardSubTitle")})]})]}),(0,r.jsx)("div",{className:"bg-white",children:(0,r.jsxs)("div",{className:"max-w-md w-full mx-auto pb-6 tablet:pb-10 pt-2 tablet:pt-4 px-3 flex flex-col gap-3",children:[f&&(0,r.jsx)(s.Eg,{variant:"error",children:f}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"h-8 border-b border-b-gray-medium flex items-center",children:(0,r.jsx)("h2",{className:"font-semibold",children:i("changeCreditcardPaymentFormCreditCardHeading")})}),(0,r.jsx)(I.K,{subscriptions:[h.changePaymentCreditCardSubscription],activeItems:[h.changePaymentCreditCardSubscription.subscriptionKey]})]}),(0,r.jsx)(w,{subscription:h.changePaymentCreditCardSubscription,isRetry:!!f}),(0,r.jsx)("div",{className:"text-center border-t border-gray-medium mt-4 pt-4",children:(0,r.jsx)(o.N,{href:"/",className:"text-anchor hover:text-anchor-dark underline text-sm font-semibold",children:(0,r.jsx)(r.Fragment,{children:i("changeCreditcardPaymentFormCancelLinkLabel")})})})]})})]})};var S=a(47466),E=a(79478),R=!0;function D({countryInfo:e,errorCodes:t}){let{translations:a}=(0,m.c3)();return(0,r.jsx)(S.wF.Provider,{value:e,children:(0,r.jsxs)(E.p.Provider,{value:t,children:[(0,r.jsx)(i.r,{routes:a.changecreditcardpaymentpageBreadCrumbs}),(0,r.jsx)(k,{})]})})}}},e=>{e.O(0,[92,6593,636,8792],()=>e(e.s=13873)),_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.