PageSourceSearch

https://mijnomgeving.parool.nl/_next/static/chunks/pages/abonnementen/persoonsgegevens-a12be028de155433.js

js parool.nl collected 2026-09-24 08:28:32 UTC 35,147 bytes, 133 lines download raw bytes

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 s=arguments[t];if(null!=s)for(var a in s)s.hasOwnProperty(a)&&(e[a]=s[a])}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]="90a699ef-a11a-4f3f-bd55-ce26f6df1b09",e._sentryDebugIdIdentifier="sentry-dbid-90a699ef-a11a-4f3f-bd55-ce26f6df1b09")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2330],{2869:(e,t,s)=>{"use strict";s.d(t,{r:()=>d});var a=s(6029),r=s(55729),i=s(57490),n=s(89456),l=s(82203),o=s.n(l),c=s(59036);function d({className:e,routes:t}){let s=(0,c.U)(),l=function(e=[]){return(0,r.useMemo)(()=>e.map((e,t,s)=>t===s.length-1?{label:e.label??"-"}:{label:e.label??"-",...e.route?{path:e.route}:{}}),[e])}(t??[]);return!l.length||s.hasWebviewLimitation?null:(0,a.jsx)(n.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:l,as:(0,a.jsx)(o(),{href:""})})}},6773:(e,t,s)=>{"use strict";function a(e){switch(e){case"MALE":return"MALE";case"FEMALE":return"FEMALE";default:return null}}function r(e){switch(e){case"FEMALE":return"FEMALE";case"MALE":return"MALE";default:return"UNSPECIFIED"}}function i(e,t,s="-"){if(!e||!t||"NONE"===e)return s;let a=t[e];return"string"==typeof a?a:s}s.d(t,{LX:()=>i,RN:()=>a,vc:()=>r})},13860:(e,t,s)=>{"use strict";s.d(t,{l:()=>n});var a=s(6029);s(55729);var r=s(89456),i=s(43343);let n=({loading:e,children:t,...s})=>{let{getTranslation:n}=(0,i.c3)();return(0,a.jsx)(r.$n,{...s,disabled:s.disabled||e,children:e?(0,a.jsx)(r.fV,{"aria-label":n("isLoadingAriaLabel"),className:"brightness-0"}):t})}},15857:(e,t,s)=>{"use strict";s.d(t,{Y:()=>c});var a=s(6029),r=s(79132),i=s(95618),n=s(89456);s(55729);var l=s(57490),o=s(25802);function c({brandId:e,status:t,children:s,testId:d}){let u=(0,r.tA)(e),{dpgConfig:m}=(0,o.G)(),h=(0,i.d)(u?u.subscriptionLogo:m.dpgHeaderLogo)?.height(50).url();return(0,a.jsx)(n.Eg,{variant:"SUCCESS"===t?"success":"PENDING"===t?"info":"error",showIcon:!h,className:"mt-2","data-testid":d,shouldAnnounce:!1,children:(0,a.jsxs)("div",{className:"gap-3 grid grid-flow-col rounded-sm items-center",children:[h&&(0,a.jsx)("div",{className:(0,l.cx)("overflow-hidden rounded-xl w-10 h-10 border border-gray-medium bg-white",!u&&"p-1"),children:(0,a.jsx)("img",{src:h,className:"w-full h-full",title:u?u.seoTitle:m.dpgTitle})}),s]})})}},17322:(e,t,s)=>{"use strict";s.d(t,{P:()=>i});var a=s(49483),r=s(32523);function i(e,t,s){let i=(0,r.a)(e,s?.in);if(isNaN(t))return(0,a.w)(s?.in||e,NaN);if(!t)return i;let n=i.getDate(),l=(0,a.w)(s?.in||e,i.getTime());return(l.setMonth(i.getMonth()+t+1,0),n>=l.getDate())?l:(i.setFullYear(l.getFullYear(),l.getMonth(),n),i)}},33385:(e,t,s)=>{"use strict";s.d(t,{K:()=>p});var a=s(6029);s(55729);var r=s(25802),i=s(95618),n=s(46636),l=s(50092),o=s(79132),c=s(59867),d=s(55597),u=s(57490),m=s(89456);let h=({logoUrl:e,title:t,onRemove:s,isRemovable:r,withPadding:i})=>(0,a.jsxs)("li",{className:(0,u.cx)("flex-none relative group",r&&"cursor-pointer"),"data-testid":"selected-subscription",onClick:r?s:()=>{},children:[r&&(0,a.jsx)("div",{className:"invisible group-hover:visible",children:(0,a.jsx)(m.In,{icon:d.s0Q,className:"absolute -top-1 -right-1 bg-white overflow-hidden rounded-full text-gray-dark"})}),(0,a.jsx)("div",{className:"overflow-hidden rounded-xl w-10 h-10 border border-gray-medium",children:e?(0,a.jsx)("img",{src:e,className:(0,u.cx)("w-full h-full",i&&"p-1"),title:t||""}):(0,a.jsx)("div",{className:"w-full h-full bg-gray-light"})})]}),p=({activeItems:e,onRemove:t,...s})=>{let{dpgConfig:d}=(0,r.G)(),u=s.subscriptions.map(e=>(0,l.ni)(n.B,e)),m=(0,o.Ek)(),p=u.filter(({subscriptionKey:t,lowerCaseBrandId:s})=>!!e.includes("magazines")&&"magazine"===m[s].brandCategory||e.includes(t)),b=void 0!==t&&e.length>1,g=b?t:()=>null;return(0,a.jsxs)("ul",{className:"flex gap-1 py-2 max-w-full flex-wrap","data-testid":"selected-subscriptions",children:[p.map(e=>{let t=e.brand.toLowerCase();if(!(0,c.e)(t,m))return null;let s=m[t],r=(0,i.d)(s.subscriptionLogo)?.height(50).url(),n=e.pcsProduct?.descriptor?.name||s.seoTitle;return(0,a.jsx)(h,{logoUrl:r,title:n,onRemove:()=>g(e.subscriptionKey),isRemovable:b},e.subscriptionKey)}
1),e.includes("account")&&(0,a.jsx)(h,{title:"DPG Media Account",onRemove:()=>g("account"),logoUrl:(0,i.d)(d.dpgHeaderLogo)?.url(),withPadding:!0,isRemovable:b})]})}},46636:(e,t,s)=>{"use strict";s.d(t,{B:()=>a});let a=(0,s(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,s)=>{"use strict";s.d(t,{ez:()=>n,wF:()=>r,yx:()=>i});var a=s(55729);let r=(0,a.createContext)([]),i=()=>(0,a.useContext)(r),n=e=>{let t=i();return t?.find(t=>t.iso2Code===e)}},63651:(e,t,s)=>{"use strict";var a=s(57490),r=s(21941);let i=/^\(\+([0-9]+)\)\s*$/;(0,r.Zg)(r.Yj,"isValidPhoneNumber",function(e){return this.test("validPhoneNumber","Oops",function(t){let{path:s,createError:r}=this;if(void 0===t||t?.match(i))return!0;let n=(0,a.FY)(t);return!!(n.length>=8&&n.length<=50)||r({path:s,message:e??"Invalid"})})})},65394:(e,t,s)=>{"use strict";s.d(t,{m:()=>l});var a=s(6029);s(55729);var r=s(55597),i=s(57490),n=s(89456);let l=({className:e,subscriptionCount:t=3,"aria-label":s,hasRightArrow:l,hasLeftCheckbox:o})=>(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"absolute w-full text-center pt-6 z-10",children:(0,a.jsx)(n.fV,{"aria-label":s})}),(0,a.jsx)(n.Or,{duration:"2s",className:"saturate-0 opacity-50 bg-transparent",children:(0,a.jsx)("ul",{className:(0,i.cx)("mb-3",e),children:Array(t).fill(null).map((e,t)=>(0,a.jsxs)("li",{className:"flex flex-row items-center border-b border-gray-medium",children:[(0,a.jsx)("span",{className:"block w-full py-4",children:(0,a.jsxs)("div",{className:"flex gap-2 text-sm items-center",children:[o&&(0,a.jsx)("div",{className:"overflow-hidden rounded-md w-4 h-4 border border-gray-medium",children:(0,a.jsx)("div",{className:"w-full h-full bg-gray-light"})}),(0,a.jsx)("div",{className:"overflow-hidden rounded-xl w-10 h-10 border border-gray-medium",children:(0,a.jsx)("div",{className:"w-full h-full bg-gray-light"})}),(0,a.jsxs)("div",{className:"flex flex-col justify-center leading-6 gap-1",children:[(0,a.jsx)("div",{className:"w-36 bg-gray-light h-4 rounded-md shrink"}),(0,a.jsx)("div",{className:"w-22 bg-gray-light h-4 rounded-md shrink"})]})]})}),l&&(0,a.jsx)("div",{className:"w-5",children:(0,a.jsx)(n.In,{icon:r.XkK,className:"text-icon"})})]},t))})})]})},71409:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/abonnementen/persoonsgegevens",function(){return s(94303)}])},78504:(e,t,s)=>{"use strict";s.d(t,{A:()=>h});var a=s(6029),r=s(55729),i=s(1699),n=s(89456),l=s(71024),o=s.n(l),c=s(81278),d=s(15615),u=s(43343);let m=o()(()=>Promise.all([s.e(3957),s.e(5330)]).then(s.bind(s,95330)),{loadableGenerated:{webpack:()=>[95330]},loading:()=>(0,a.jsx)("div",{style:{width:"300px",height:"250px"}}),ssr:!1});function h({error:e,traceId:t}){let{getTranslation:s,getPortableText:l}=(0,u.c3)(),{pathname:o,push:p,reload:b}=(0,c.useRouter)();return(0,r.useEffect)(()=>{if(window.location){let s=new URLSearchParams(window.location.search);"forbidden"===s.get("error")&&s.has("reason")||(0,i.c_)(e||Error("[500] Internal server error"),{extra:{traceId:t,href:window.location.href}})}},[t,e]),(0,a.jsxs)("div",{className:"text-center","data-testid":"error-page-500",children:[(0,a.jsx)("div",{className:"mt-8 inline-block",children:(0,a.jsx)(m,{src:"/animations/500.lottie",autoplay:!0,loop:!0,style:{width:"300px",height:"250px"}})}),(0,a.jsx)("div",{className:"flex flex-col text-center bg-white py-8 px-4",children:(0,a.jsxs)("div",{className:"max-w-xl mx-auto space-y-4 tablet:space-y-6",children:[(0,a.jsx)(d.A,{className:"text-xl font-bold",message:l("errorDescription")}),"/500"===o?(0,a.jsx)(n.$n,{variant:"primary",onClick:()=>{p("/account")},children:s("errorBackButtonLabel404")}):(0,a.jsx)(n.$n,{variant:"primary",onClick:()=>{b()},children:s("errorRetryButtonLabel")}),t&&(0,a.jsxs)("span",{"data-testid":"error-trace-id",className:"pt-4 font-monospace block text-gray-dark",children:[s("errorTraceIdLabel")," ",t]})]})})]})}},90512:(e,t,s)=>{"use strict";s.d(t,{E0:()=>u,Yq:()=>d,bU:()=>c});var a=s(88274),r=s(73491),i=s(14090),n=s(99405),l=s(46700),o=s(66632);function c(e,t="d MMMM yyyy",s="-",r=s){return(0,l.Wo)(e)||null===e?null!==e&&e.length?d((0,a.H)(e),t):r:s}function d(e,t="d MMMM yyyy"){return(0,r.GP)(e,t,{locale:o.nl})}function u(e,t){return t?(0,i.$)(t)?t:(0,n.qg)(t,"yyyy-MM-dd",new Date):""}},94303:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>ei,default:()=>en});var a=s(6029),r=s(55729),i=s(79478),n=s(2869),l=s(43343),o=s(89456),c=s(57490),d=s(78504),u=s(50197),m=s(50092),h=s(76407);let p=(0,m.UG)(`
13    query ChangeCustomerDetailsSubscriptionList {
14      getLinkedSubscriptions {
15        ...ChangeCustomerDetailsSubscriptionItemFragment
16      }
17    }
18  `),b=(0,m.UG)(`
19    fragment ChangeCustomerDetailsSubscriptionItemFragment on S2LinkedSubscription {
20      role
21      brand
22      status
23      lowerCaseBrandId
24      subscriptionId
25      subscriptionKey
26      canonicalSubscription {
27        customer {
28          customerId
29          email
30          ...CustomerFieldsFragment
31        }
32      }
33      pcsProduct {
34        descriptor {
35          name
36        }
37      }
38      ...SelectedItem
39      ...SubscriptionListItemFragment
40      ...ChangeCustomerDetailsStatusListFragment
41    }
42  `);var g=s(15857),x=s(15615),f=s(79132);let v=(0,m.UG)(`
43    fragment ChangeCustomerDetailsStatusNotificationFragment on S2LinkedSubscription {
44      lowerCaseBrandId
45    }
46  `),N=({subscription:e,status:t})=>{let{getDictionaryValue:s}=(0,l.c3)(),r=(0,f.Ek)(),i=(0,m.ni)(v,e),n=r[i?.lowerCaseBrandId].brandCategory,o="SUCCESS"===t?`changeCustomerDetailsSuccessfulUpdateMessage_${n}`:`changeCustomerDetailsFailedUpdateMessage_${n}`;return(0,a.jsx)(g.Y,{status:t,brandId:i.lowerCaseBrandId,testId:"SUCCESS"===t?"subscription-status-item-success":"subscription-status-item-failure",children:(0,a.jsx)(x.A,{message:s(o),values:{brand_name:r[i?.lowerCaseBrandId].seoTitle}}
46)})},j=(0,m.UG)(`
47  fragment ChangeCustomerDetailsStatusListFragment on S2LinkedSubscription {
48    subscriptionKey
49    canonicalSubscription {
50      customer {
51        customerId
52      }
53    }
54    ...SubscriptionDataStatusFragment
55    ...ChangeCustomerDetailsStatusNotificationFragment
56  }
57`),C=(0,m.UG)(`
58  fragment ChangeCustomerDetailsResultItemFragment on UmsUpdateCustomerDetailsResultItem {
59    __typename
60    customerId
61  }
62`),w=(0,m.UG)(`
63  fragment ChangeCustomerDetailsResultFragment on UmsUpdateCustomerDetailsResult {
64    __typename
65    results {
66      ...ChangeCustomerDetailsResultItemFragment
67    }
68  }
69`);function y({error:e,result:t,selectedSubscriptions:s}){let{getErrorTranslation:r}=(0,l.YY)(),i=new Map(t.map(e=>(0,m.ni)(C,e)).map(({customerId:e,__typename:t})=>[e,t])),n=e=>i.get((0,m.ni)(j,e).canonicalSubscription?.customer?.customerId),c=s.filter(e=>"UmsUpdateCustomerDetailsSuccessResult"===n(e)),d=s.filter(e=>"UmsUpdateCustomerDetailsFailureResult"===n(e)),u=e?.code==="MO__UNKNOWN_ERROR";return(0,a.jsxs)("div",{"data-testid":"change-customer-details-status-list",className:"flex flex-col gap-2 text-sm",children:[e?.code&&u&&(0,a.jsx)(o.Eg,{variant:"error",className:"mt-2",children:(0,a.jsx)("p",{className:"pt-0.5",children:r(e.code)})}),e&&!u&&s.map(e=>{let t=(0,m.ni)(j,e);return(0,a.jsx)(N,{subscription:t,status:"FAILURE"},t.subscriptionKey)}),d.map(e=>{let t=(0,m.ni)(j,e);return(0,a.jsx)(N,{subscription:t,status:"FAILURE"},t.subscriptionKey)}),c.map(e=>{let t=(0,m.ni)(j,e);return(0,a.jsx)(N,{subscription:t,status:"SUCCESS"},t.subscriptionKey)})]})}var S=s(1699);let D=(0,m.UG)(`
70  mutation UpdateCustomerDetails($input: UpdateCustomerDetailsInput!) {
71    __typename
72    updateCustomerDetails(input: $input) {
73      __typename
74      ... on UmsUpdateCustomerDetailsResult {
75        ...ChangeCustomerDetailsResultFragment
76      }
77      ... on UmsViolations {
78        __typename
79        violations {
80          code
81        }
82      }
83    }
84  }
85`);var F=s(62074),I=s(21941),L=s(17322),E=s(68123);s(63651);let M=I.Ik().shape({gender:I.Yj().required("genericFormMissingOrInvalidInputErrorMessage"),firstName:I.Yj().required("genericFormMissingOrInvalidInputErrorMessage").matches(new RegExp(c.lX),"genericFormMissingOrInvalidInputErrorMessage").matches(new RegExp(/^[^.]*$/),"genericFormMissingOrInvalidInputErrorMessage"),lastName:I.Yj().required("genericFormMissingOrInvalidInputErrorMessage").matches(new RegExp(c.lX),"genericFormMissingOrInvalidInputErrorMessage"),birthDate:I.p6().required("genericFormMissingOrInvalidInputErrorMessage").test("min-age","genericFormInvalidBirthDateErrorMessage",e=>{var t,s;return e<=(t=(0,E.o)(Date.now(),void 0),s=void 0,(0,L.P)(t,-192,s))}),phone:I.Yj().isValidPhoneNumber("genericFormInvalidPhoneNumberErrorMessage"),mobile:I.Yj().isValidPhoneNumber("genericFormInvalidPhoneNumberErrorMessage")}),k=(0,m.UG)(`
86  fragment CustomerFieldsFragment on S2Customer {
87    firstName
88    lastName
89    gender
90    birthDate
91    phone
92    mobile
93  }
94`),B={firstName:"",lastName:"",gender:"UNKNOWN",birthDate:"",phone:"",mobile:""};var _=s(65394),U=s(95618),O=s(6773);let P=(0,m.UG)(`
95  fragment SubscriptionItemFragment on S2LinkedSubscription {
96    lowerCaseBrandId
97    pcsProduct {
98      descriptor {
99        name
100      }
101    }
102    canonicalSubscription {
103      customer {
104        gender
105        firstName
106        lastName
107      }
108    }
109  }
110`);function R(e){let t=e.isEnabled,{translations:s}=(0,l.c3)(),r=(0,m.ni)(P,e.subscription),i=(0,f.tA)(r.lowerCaseBrandId),n=(0,U.d)(i.subscriptionLogo)?.height(50).url(),o=r.pcsProduct?.descriptor?.name||i.seoTitle,d=r?.canonicalSubscription?.customer,u=(0,c.G)({gender:(0,O.RN)(d?.gender),first_name:d?.firstName,last_name:d?.lastName},s);return(0,a.jsx)("div",{className:"flex flex-row items-center mt-2 first:mt-0",children:(0,a.jsx)("span",{"data-testid":"subscription-item",className:"w-full flex flex-col gap-3",children:(0,a.jsxs)("div",{className:(0,c.cx)("flex gap-2 text-sm",!t&&"text-gray-dark"),"data-testid":"subscription-label",children:[(0,a.jsx)("div",{className:(0,c.cx)("overflow-hidden rounded-xl w-10 h-10 border border-gray-medium flex-none"),"data-testid":"subscription-image",children:n?(0,a.jsx)("img",{src:n,className:(0,
110c.cx)("w-full h-full",!t&&"grayscale brightness-150"),title:o}):(0,a.jsx)("div",{className:"w-full h-full bg-gray-light"})}),!e.iconOnly&&(0,a.jsxs)("div",{className:"flex flex-col justify-center leading-6",children:[(0,a.jsx)("span",{className:"font-semibold break-all","data-testid":"subscription-title",children:o}),e.subTitle?(0,a.jsx)("span",{className:"break-all","data-dpg-pii":!0,children:e.subTitle}):(0,a.jsx)("span",{className:"break-all","data-dpg-pii":!0,children:u})]})]})})})}let T=(0,m.UG)(`
111  fragment ChangeCustomerDetailsSubscriptionOptionFragment on S2LinkedSubscription {
112    subscriptionKey
113    ...SubscriptionItemFragment
114  }
115`);function A({isActive:e,id:t,onToggle:s,subscriptions:r}){return(0,a.jsxs)("div",{className:"grid grid-cols-[30px_1fr] py-3","data-testid":"change-personal-data-overview-subscription-option",children:[(0,a.jsx)(o.Sc,{id:t,className:"mt-2",checked:e,onClick:()=>s(r.map(e=>(0,m.ni)(T,e).subscriptionKey))}),(0,a.jsx)("label",{htmlFor:t,children:r.map(e=>{let t=(0,m.ni)(T,e);return(0,a.jsx)(R,{subscription:t,isEnabled:!0},t.subscriptionKey)})})]},t)}let G=(0,m.UG)(`
116  fragment InactiveSubscriptionItemFragment on S2LinkedSubscription {
117    lowerCaseBrandId
118    role
119    canonicalSubscription {
120      customer {
121        email
122      }
123    }
124    ...SubscriptionItemFragment
125  }
126`);function K({subscription:e}){let t,{getDictionaryValue:s,getDictionaryStringValue:r}=(0,l.c3)(),i=(0,m.ni)(G,e),[n,c]=(t=(0,f.tA)(i.lowerCaseBrandId),t?.brandCategory==="magazine"?["is-magazine","changeCustomerDetailsMagazineNotification"]:"OWNER"!==i.role?["no-owner-permissions","changeCustomerDetailsNoOwnerNotification"]:i?.canonicalSubscription?.customer?.email?["unable-to-edit","changeCustomerDetailsUnableToEditNotification"]:["no-email","changeCustomerDetailsSubscriptionHasNoEmailNotification"]);return(0,a.jsxs)("li",{className:"py-2","data-testid":"change-customer-details-overview-inactive-subscription",children:[(0,a.jsxs)("div",{className:"pl-6",children:[(0,a.jsx)(R,{subscription:i,isEnabled:!1,subTitle:"DIGITAL_CO_READER"===i.role?r("changeCustomerDetailsSubscriptionCoreaderSubtitle"):void 0}),(0,a.jsx)(o.Eg,{variant:"warning",className:"mt-4 text-sm","data-testid":`change-customer-details-overview-item-${n}-notification`,children:(0,a.jsx)(x.A,{message:s(c)})})]}),(0,a.jsx)(o.cG,{className:"mt-4 mb-0"})]})}let Y=(0,m.UG)(`
127  fragment SubscriptionListItemFragment on S2LinkedSubscription {
128    subscriptionKey
129    ...SubscriptionItemFragment
130    ...ChangeCustomerDetailsSubscriptionOptionFragment
131    ...InactiveSubscriptionItemFragment
132  }
133`);function q({inactiveSubscriptions:e,activeSubscriptionGroups:t,toggleActiveItem:s,activeItems:r}){let{getDictionaryStringValue:i}=(0,l.c3)();return(0,a.jsxs)("ul",{children:[[...t.entries()].map(([e,t])=>{let n=t.length>1;return(0,a.jsxs)("li",{className:n?"pb-2":void 0,"data-testid":n?"change-customer-details-overview-grouped-subscriptions":"change-customer-details-overview-active-subscription",children:[(0,a.jsx)(A,{id:e,subscriptions:t,isActive:r.includes(t[0]?.subscriptionKey??""),onToggle:s}),n&&(0,a.jsx)(o.Eg,{variant:"info",className:"mt-1 mb-4 ml-6",children:i("changeCustomerDetailsSubscriptionConsolidatedNotification")}),(0,a.jsx)(o.cG,{className:"my-0"})]},e)}),e.map(e=>{let t=(0,m.ni)(Y,e);return(0,a.jsx)(K,{subscription:t},t.subscriptionKey)})]})}function V({changeCustomerDetailsProps:e}){let{activeSubscriptionGroups:t,inactiveSubscriptions:s,fetching:r,activeItems:i,setActiveItems:n}=e,{getDictionaryStringValue:d,getDictionaryValue:u}=(0,l.c3)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"font-semibold",children:d("changeCustomerDetailsSubscriptionListTitle")}),(0,a.jsx)(o.cG,{className:"my-2"}),(0,a.jsx)("div",{className:"flex flex-col",children:r?(0,a.jsx)(_.m,{subscriptionCount:1,"aria-label":d("changeCustomerDetailsSubscriptionPlaceholder"),hasLeftCheckbox:!0}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(q,{activeSubscriptionGroups:t,inactiveSubscriptions:s,activeItems:i,toggleActiveItem:e=>n(t=>e.reduce((e,t)=>(0,c.Eo)(e,t),t))}),(0,a.jsx)(o.Eg,{variant:"info",shouldAnnounce:!1,"data-testid":"change-customer-details-overview-add-subscription-notification",children:(0,a.jsx)(x.A,{className:"text-sm",message:u("changeCustomerDetailsLinkSubscriptionNotification")})})]})})]})}var $=s(237),z=s(55597);let W=({changeCustomerDetailsProps:e})=>{let{getDictionaryStringValue:t}=(0,l.c3)(),{fetching:s,activeItems:r,handleProceedToForm:i}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsx)(o.gj,{variant:"row",steps:[{id:"step-1",label:t("changeCustomerDetailsOverviewStepLabel"),status:"active"},{id:"step-2",label:t("changeCustomerDetailsFormStepLabel"),status:"inactive"}]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"heading-4 font-bold mb-1",children:t("changeCustomerDetailsOverviewStepTitle")}),(0,a.jsx)("span",{children:t("changeCustomerDetailsOverviewStepSubTitle")})]})]}),(0,a.jsx)("div",{className:"bg-white",children:(0,a.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",children:[(0,a.jsx)(V,{changeCustomerDetailsProps:e}),(0,a.jsxs)("div",{className:"grid grid-flow-col gap-2 mt-4",children:[(0,a.jsxs)(o.$n,{className:"w-full",as:"a",href:"/abonnementen",variant:"secondary","data-testid":"change-customer-details-overview-previous-step-button",children:[(0,a.jsx)(o.In,{icon:z.CeG,className:"mr-1"}),t("changeCustomerDetailsPreviousStepButtonLabel")]}),(0,a.jsx)(o.$n,{className:"w-full",type:"button",onClick:i,variant:"primary","data-testid":"change-customer-details-overview-next-button",disabled:s||r.length<1,children:t("changeCustomerDetailsSelectButtonLabel")})]}),(0,a.jsx)("div",{className:"text-center border-t border-gray-medium pt-4 mt-4",children:(0,a.jsx)($.N,{href:"/abonnementen",className:"text-anchor hover:text-anchor-dark underline text-sm font-semibold",children:t("changeCustomerDetailsCancelLinkLabel")})})]})})]})};var X=s(33385),H=s(13860),J=s(47466);function Q({formik:e,prefilledValues:t}){let{getTranslation:s,getDictionaryStringValue:i}=(0,l.c3)(),{getErrorTranslation:n}=(0,l.YY)(),c=(0,J.yx)(),d=(0,f.PB)(),u=(()=>{let{translations:e}=(0,l.c3)();return[{label:e.MALE?.toString()??"",value:"MALE"},{label:e.FEMALE?.toString()??"",value:"FEMALE"},{label:e.UNKNOWN?.toString()??"",value:"UNKNOWN"},{label:"-",value:"NONE"}]})(),m=e.errors,h=(0,r.useMemo)(()=>c.map(e=>({code:e.telephoneCode,name:e.iso2Code,highlighted:"BE"===e.iso2Code||"NL"===e.iso2Code})),[c]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"font-semibold",children:i("changeCustomerDetailsFormBlockTitle")}),(0,a.jsxs)("span",{className:"text-xs",children:[(0,a.jsx)(o.In,{icon:z.iW_,className:"text-info far mr-1",size:"lg"}),i("changeCustomerDetailsFormBlockDescription")]})]}),(0,a.jsx)(o.zB,{name:"gender",touched:e.touched?.gender??!1,error:m.gender&&n(m.gender),requiredDescription:s("genericFormRequiredDescription"),children:(0,a.jsx)(o.qF,{testId:"edit-input-gender",items:u,initialSelectedItem:u.find(t=>t.value===e.values.gender),onChange:({value:t})=>e.setFieldValue("gender",t),onBlur:e.handleBlur,labelField:"label",keyField:"value",placeholder:s("genericFormGenderTitleLabel"),optionalSuffix:s("genericFormOptionalLabel"),required:!0})}),(0,a.jsx)(o.zB,{name:"firstName",touched:!!e.touched.firstName,error:m.firstName&&n(m.firstName),children:(0,a.jsx)(o.pd,{"data-testid":"edit-input-first-name",className:"w-full",label:s("personalInfoFormFirstNameLabel"),value:e.values.firstName??"",onChange:e.handleChange,onBlur:e.handleBlur,optionalSuffix:s("genericFormOptionalLabel"),validityMessage:s("genericFormMissingOrInvalidInputErrorMessage"),autoComplete:"given-name",required:!0})}),(0,a.jsx)(o.zB,{name:"lastName",touched:!!e.touched.lastName,error:m.lastName&&n(m.lastName),children:(0,a.jsx)(o.pd,{className:"w-full",label:s("personalInfoFormLastNameLabel"),"data-testid":"edit-input-last-name",value:e.values.lastName??"",onChange:e.handleChange,onBlur:e.handleBlur,optionalSuffix:s("genericFormOptionalLabel"),validityMessage:s("genericFormMissingOrInvalidInputErrorMessage"),autoComplete:"family-name",required:!0})}),(0,a.jsx)(o.zB,{name:"birthDate",touched:!!e.touched.birthDate,error:m.birthDate&&n(m.birthDate),
133children:(0,a.jsx)(o.pd,{id:"birthDate",type:"date",className:"w-full",label:s("personalInfoFormBirthDateLabel"),"data-testid":"edit-input-birth-date",value:e.values.birthDate??"",onChange:e.handleChange,onBlur:e.handleBlur,optionalSuffix:s("genericFormOptionalLabel"),validityMessage:m.birthDate&&n(m.birthDate),autoComplete:"bday",required:!0})}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o.Sc,{checked:e.values.editPhone,onCheckedChange:s=>{let a=!0===s;e.setFieldValue("editPhone",a),a||e.setFieldValue("phone",t.phone)},"data-testid":"edit-toggle-phone-number",children:i("changeCustomerDetailsFormEditPhoneCheckboxLabel")}),e.values.editPhone&&(0,a.jsx)(o.zB,{name:"phone",touched:!!e.touched.phone,error:m.phone&&n(m.phone),children:(0,a.jsx)(o.D9,{countries:h,defaultCountry:"nl"===d.brandCountry?"NL":"BE",label:s("personalInfoFormPhoneNumberLabel"),countryCodeLabel:s("personalInfoFormPhoneNumberCountryCodeLabel"),"data-testid":"edit-input-phone-number",highlightedLabel:s("personalInfoFormPreferredPhoneCountries"),otherLabel:s("personalInfoFormOtherPhoneCountries"),value:e.values.phone||"",onChange:t=>{e.setFieldValue("phone",t)},onBlur:e.handleBlur,optionalSuffix:s("genericFormOptionalLabel"),autoComplete:"tel-national",required:!1})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o.Sc,{checked:e.values.editMobile,onCheckedChange:s=>{let a=!0===s;e.setFieldValue("editMobile",a),a||e.setFieldValue("mobile",t.mobile)},"data-testid":"edit-toggle-mobile",children:i("changeCustomerDetailsFormEditMobileCheckboxLabel")}),e.values.editMobile&&(0,a.jsx)(o.zB,{name:"mobile",touched:!!e.touched.mobile,error:m.mobile&&n(m.mobile),children:(0,a.jsx)(o.D9,{countries:h,defaultCountry:"nl"===d.brandCountry?"NL":"BE",label:s("personalInfoFormMobileNumberLabel"),countryCodeLabel:s("personalInfoFormPhoneNumberCountryCodeLabel"),"data-testid":"edit-input-mobile",highlightedLabel:s("personalInfoFormPreferredPhoneCountries"),otherLabel:s("personalInfoFormOtherPhoneCountries"),value:e.values.mobile||"",onChange:t=>{e.setFieldValue("mobile",t)},onBlur:e.handleBlur,optionalSuffix:s("genericFormOptionalLabel"),autoComplete:"tel-national",required:!1})})]})]})}let Z=({changeCustomerDetailsProps:e})=>{let{getDictionaryStringValue:t}=(0,l.c3)(),{formik:s,activeItems:r,selectedSubscriptions:i,prefilledValues:n}=e,{handleSubmit:c,isSubmitting:d}=s;return(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsx)(o.gj,{variant:"row",steps:[{id:"step-1",label:t("changeCustomerDetailsOverviewStepLabel"),status:"completed"},{id:"step-2",label:t("changeCustomerDetailsFormStepLabel"),status:d?"loading":"active"}]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"heading-4 font-bold mb-1",children:t("changeCustomerDetailsFormStepTitle")}),(0,a.jsx)("span",{children:t("changeCustomerDetailsFormStepSubTitle")})]})]}),(0,a.jsx)("div",{className:"bg-white",children:(0,a.jsxs)("form",{onSubmit:c,className:"max-w-md w-full mx-auto pb-6 tablet:pb-10 pt-2 tablet:pt-4 px-3 flex flex-col gap-4",children:[i.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"h-8 border-b border-b-gray-medium flex items-center",children:(0,a.jsx)("h2",{className:"font-semibold",children:t("changeCustomerDetailsSelectedSubscriptionsTitle")})}),(0,a.jsx)(X.K,{subscriptions:i,activeItems:r})]}),(0,a.jsx)(Q,{formik:s,prefilledValues:n}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(o.$n,{type:"button",variant:"secondary",className:"cursor-pointer",onClick:()=>s.setFieldValue("currentStep","overview"),"data-testid":"change-personal-data-form-previous-button",children:[(0,a.jsx)(o.In,{icon:z.Wzs,className:"mr-1"}),t("changeCustomerDetailsPreviousStepButtonLabel")]}),(0,a.jsx)(H.l,{type:"submit",variant:"primary",className:"grow","data-testid":"change-personal-data-form-next-button",loading:d,disabled:d||Object.keys(s.errors).length>0,children:t("changeCustomerDetailsSendButtonLabel")})]}),(0,a.jsx)("div",{className:"text-center border-t border-gray-medium pt-4",children:(0,a.jsx)($.N,{href:"/abonnementen",className:"text-anchor hover:text-anchor-dark underline text-sm font-semibold",children:t("changeCustomerDetailsCancelLinkLabel")})})]})})]})};var ee=s(823),et=s(90512);let es=({customerData:e})=>{let{getTranslation:t,getDictionaryStringValue:s,translations:r}=(0,l.c3)();return(0,a.jsxs)("div",{className:"bg-gray-light p-4 rounded border border-gray-medium","data-testid":"subscription-data-overview",children:[(0,a.jsx)("h3",{children:s("changeCustomerDetailsResultStepTitle")}),(0,a.jsxs)("ul",{className:"mt-2 space-y-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-dark",children:t("genericFormGenderTitleLabel")}),(0,a.jsx)("p",{className:"text-sm mt-0.5",children:(0,O.LX)(e.gender,r)})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-dark",children:t("personalInfoFormFirstNameLabel")}),(0,a.jsx)("p",{className:"text-sm mt-0.5",children:e?.firstName||"-"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-dark",children:t("personalInfoFormLastNameLabel")}),(0,a.jsx)("p",{className:"text-sm mt-0.5",children:e?.lastName||"-"})]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-dark",children:t("personalInfoFormBirthDateLabel")}),(0,a.jsx)("p",{className:"text-sm mt-0.5",children:e?.birthDate?(0,et.Yq)(new Date(e.birthDate)):"-"})]}),e.editPhone&&(0,a.jsxs)("li",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-dark",children:t("personalInfoFormPhoneNumberLabel")}),(0,a.jsx)("p",{className:"text-sm mt-0.5",children:(0,c.FY)(e.phone)?e.phone:"-"})]}),e.editMobile&&(0,a.jsxs)("li",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-dark",children:t("personalInfoFormMobileNumberLabel")}),(0,a.jsx)("p",{className:"text-sm mt-0.5",children:(0,c.FY)(e.mobile)?e.mobile:"-"})]})]})]})},ea=({changeCustomerDetailsProps:e})=>{let t=(0,f.PB)(),{getDictionaryStringValue:s,getDictionaryValue:r}=(0,l.c3)(),{changeDataResponse:i,changeDataViolations:n,selectedSubscriptions:c,formik:d}=e,u=i?.results.some(e=>"UmsUpdateCustomerDetailsFailureResult"===e.__typename),m=i?.results.some(e=>"UmsUpdateCustomerDetailsSuccessResult"===e.__typename);return(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsx)(o.gj,{variant:"row",steps:[{id:"step-1",label:s("changeCustomerDetailsOverviewStepLabel"),status:"completed"},{id:"step-2",label:s("changeCustomerDetailsFormStepLabel"),status:n.length||u?"error":"completed"}]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"heading-4 font-bold mb-1",children:s("changeCustomerDetailsResultStepTitle")}),(0,a.jsx)("span",{children:s("changeCustomerDetailsResultStepSubTitle")})]})]}),(0,a.jsx)("div",{className:"bg-white",children:(0,a.jsxs)("div",{className:"max-w-md w-full mt-3 tablet:mt-6 mx-auto pb-6 tablet:pb-10 px-3 flex flex-col gap-4",children:[(0,a.jsx)(y,{error:n[0],result:i?.results??[],selectedSubscriptions:c}),!n.length&&!(u&&!m)&&(0,a.jsx)(es,{customerData:d.values}),(0,a.jsx)(o.cG,{className:"my-1"}),(0,a.jsx)("div",{className:"flex flex-col gap-4 text-center text-sm",children:t.host&&(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsx)("h2",{className:"heading-6 font-bold mb-4",children:s("changeCustomerDetailsReadTheNewsOnlineTitle")}),(0,a.jsx)($.N,{href:(0,ee.H)(t),passHref:!0,children:(0,a.jsx)(o.$n,{as:"span",variant:"primary",className:"cursor-pointer w-full","data-testid":"change-customer-details-brand-link",children:(0,a.jsx)(x.A,{message:r("changeCustomerDetailsGoToBrandButtonLabel"),values:{brand_host:t.host}})})}),(0,a.jsx)(o.$n,{className:"w-full mt-3 ",as:"a",href:"/abonnementen",variant:"secondary","data-testid":"change-customer-details-back-button",children:s("changeCustomerDetailsB
133ackToOverviewButtonLabel")})]})})]})})]})};function er(){let e=(()=>{let e=(()=>{let[{data:e,error:t,fetching:s}]=(0,u.IT)({query:p}),[a,i]=(0,r.useState)([]),n=(()=>{let{getFeatureFlag:e}=(0,h.h)();return(0,r.useCallback)((t,s)=>{let{role:a,status:r,email:i}=t;return!!i&&"ACTIVE"===r&&"OWNER"===a&&e(s,"isBrandSubscriptionsCustomerDataEditingEnabled")},[e])})(),l=(0,r.useMemo)(()=>e?.getLinkedSubscriptions?.map(e=>(0,m.ni)(b,e)),[e]),o=(0,r.useCallback)(e=>n({role:e.role,status:e.status,email:e.canonicalSubscription?.customer?.email},e.lowerCaseBrandId),[n]),{truthy:d,falsy:g}=(0,c.Of)(l,o),x=(0,r.useMemo)(()=>(d??[]).reduce((e,t)=>{let s=t.canonicalSubscription?.customer?.customerId??t.subscriptionKey;return e.set(s,[...e.get(s)??[],t]),e},new Map),[d]),f=(0,r.useMemo)(()=>d?.filter(e=>a.includes(e.subscriptionKey))||[],[a,d]);return{activeSubscriptionGroups:x,inactiveSubscriptions:g,activeItems:a,setActiveItems:i,selectedSubscriptions:f,fetching:s,error:t}})(),{onSubmit:t,changeDataViolations:s,changeDataResponse:a}=(e=>{let[t,s]=(0,u.n_)(D),[a,i]=(0,r.useState)([]),[n,l]=(0,r.useState)();return{onSubmit:async(t,{setFieldValue:a})=>{let r=e.reduce((e,t)=>{let s=t.canonicalSubscription?.customer?.customerId;return s&&e.push(s),e},[]),{data:n,error:o}=await s({input:{customerIds:r,...Object.fromEntries(Object.entries({dateOfBirth:t.birthDate||void 0,firstName:t.firstName||void 0,gender:t.gender||void 0,lastName:t.lastName||void 0,mobile:t.editMobile?(0,c.FY)(t.mobile)?t.mobile:null:void 0,phoneNumber:t.editPhone?(0,c.FY)(t.phone)?t.phone:null:void 0}).filter(([,e])=>void 0!==e))}});if(o){await a("currentStep","result"),i([{code:"MO__UNKNOWN_ERROR"}]),(0,S.OG)(`[use-change-customer-details-submit] Unknown error, status code ${o.response?.status??"unknown"}: ${o.message}`);return}n?.updateCustomerDetails.__typename==="UmsUpdateCustomerDetailsResult"?(await a("currentStep","result"),l((0,m.ni)(w,n.updateCustomerDetails)),i([])):n?.updateCustomerDetails.__typename==="UmsViolations"&&n.updateCustomerDetails.violations.length&&(await a("currentStep","result"),i(n.updateCustomerDetails.violations))},changeDataViolations:a,changeDataResponse:n}})(e.selectedSubscriptions),{formik:i,handleProceedToForm:n,prefilledValues:l}=((e,t)=>{let s=(0,F.Wx)({validationSchema:M,initialValues:{currentStep:"overview",editPhone:!1,editMobile:!1,...B},validateOnBlur:!0,onSubmit:e}),a=(0,r.useMemo)(()=>{let e,s;return e=t.map(e=>e.canonicalSubscription.customer).map(e=>(0,m.ni)(k,e)),{firstName:(s=t=>{let s;return(s=e.map(e=>e?.[t]).filter(e=>!!e)).length>0&&s.every(e=>e===s[0])?s[0]:""})("firstName"),lastName:s("lastName"),gender:s("gender")||"UNKNOWN",birthDate:s("birthDate"),phone:s("phone"),mobile:s("mobile")}},[t]),{setFormikState:i}=s;return{formik:s,handleProceedToForm:(0,r.useCallback)(()=>{i(e=>({...e,values:{...e.values,currentStep:"form",...a}}))},[i,a]),prefilledValues:a}})(t,e.selectedSubscriptions);return{...e,changeDataViolations:s,changeDataResponse:a,formik:i,handleProceedToForm:n,prefilledValues:l}})(),{formik:{values:t},error:s}=e;return((0,r.useEffect)(()=>{(0,c.Ux)()},[t.currentStep]),s)?(0,a.jsx)(d.A,{error:s}):(0,a.jsxs)(o.BJ.Navigator,{current:t.currentStep,children:[(0,a.jsx)(o.BJ.Screen,{name:"overview",children:(0,a.jsx)(W,{changeCustomerDetailsProps:e})}),(0,a.jsx)(o.BJ.Screen,{name:"form",children:(0,a.jsx)(Z,{changeCustomerDetailsProps:e})}),(0,a.jsx)(o.BJ.Screen,{name:"result",children:(0,a.jsx)(ea,{changeCustomerDetailsProps:e})})]})}var ei=!0;function en({errorCodes:e,countryInfo:t}){let{translations:s}=(0,l.c3)();return(0,a.jsx)(J.wF.Provider,{value:t,children:(0,a.jsxs)(i.p.Provider,{value:e,children:[(0,a.jsx)(n.r,{routes:s.changecustomerdetailspageBreadCrumbs}),(0,a.jsx)(er,{})]})})}}},e=>{e.O(0,[5386,7447,2074,1941,92,6593,636,8792],()=>e(e.s=71409)),_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.