1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4235],{57449:function(e){e.exports=function(e,t){var a=t.prototype,n=a.format;a.format=function(e){var t=this,a=this.$locale();if(!this.isValid())return n.bind(this)(e);var o=this.$utils(),r=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return a.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return a.ordinal(t.week(),"W");case"w":case"ww":return o.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return o.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return o.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}});return n.bind(this)(r)}}},57019:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user",function(){return a(74426)}])},74426:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return J},default:function(){return user}});var n=a(52322),o=a(5632),r=a(2784),i=a(88080),s=a(2519),l=a(23848),c=a(12524),d=a.n(c),u=a(25648),m=a(50639),_=a(1786),p=a(17289),g=a(94498);let h=[...g.Z.myPage.showHome?[{componentName:"UserHome",icon:"Home",label:"myPage.menu.home"}]:[],...g.Z.myPage.showMyDonors?[{componentName:"UserMyDonor",icon:"Donors",label:"myPage.menu.myDonors",tabId:"my-donors"}]:[],...g.Z.myPage.showTreatment?[{componentName:"UserTreatment",icon:"Clinic",label:"myPage.menu.treatment",tabId:"treatment-details"}]:[],...g.Z.myPage.showStorage?[{componentName:"UserCryoStorage",icon:"Storage",label:"myPage.menu.cryostorage",tabId:"storage"}]:[],...g.Z.myPage.showOrderHistory?[{componentName:"UserOrderHistory",icon:"Document",label:"myPage.menu.orderHistory",tabId:"order-history"}]:[],...g.Z.myPage.showSettings?[{componentName:"UserSettings",icon:"Settings",label:"myPage.menu.settings",tabId:"settings"}]:[]];var y=a(16768),v=a.n(y);let UserPageNavigationLarge=e=>{let{activeComponent:t,setActiveComponent:a}=e,{t:i}=(0,m.QT)(),[s,l]=(0,r.useState)([]),[c,g]=(0,r.useState)(!1),[y,x]=(0,r.useState)(!1),[b,C]=(0,r.useState)(),S=(0,r.useRef)(null),N=(0,r.useRef)(null),j=(0,r.useRef)(null),f=(0,o.useRouter)(),checkBounding=()=>{if(!j.current||!N.current)return;let e=N.current.getBoundingClientRect(),t=j.current.getBoundingClientRect(),a=Array.from(j.current.children),n=0;a.map(a=>{let o=a.getBoundingClientRect();if(o.right-t.left<=e.right)n+=a.clientWidth,l(e=>e.slice(0,-1));else{let e=a.getAttribute("data-nav-name");e&&l(t=>[...t,e])}}),C(n)},handleClick=(e,t)=>{if(f.asPath){let e=f.asPath.split("#");t?f.push("".concat(e[0],"#").concat(t)):f.push("".concat(e[0]))}a(e)};return(0,r.useEffect)(()=>{checkBounding(),window.addEventListener("resize",checkBounding);let e=Array.from(document.querySelectorAll(".".concat(v().item)));return e.forEach(e=>{let t=e.offsetWidth;e.style.width="".concat(t+2,"px")}),()=>window.removeEventListener("resize",checkBounding)},[]),(0,r.useEffect)(()=>{if(c){let e=Array.from(document.querySelectorAll(".".concat(v().truncateItem)));e.forEach(e=>{let t=e.offsetWidth;e.style.width="".concat(t+2,"px")})}},[c]),(0,n.jsx)("div",{className:v().component,ref:S,children:(0,n.jsxs)("div",{className:v().container,ref:N,children:[(0,n.jsx)("div",{className:d()(v().content,{[v().borderRadius]:!!s.length}),ref:j,style:{width:s.length>0?"".concat(b,"px"):"auto"},children:h.map((e,a)=>(0,n.jsxs)("button",{className:d()(v().item,{[v().active]:e.componentName===t,[v().isHidden]:s.includes(e.componentName)}),"data-nav-name":e.componentName,onClick:()=>{handleClick(e.componentName,e.tabId),x(!1),g(!1)},children:[(0,n.jsx)(_.Z,{className:v().icon,name:e.icon}),(0,n.jsx)(p.Z,{className:v().navItemLabel,children:i(e.label)}),t===e.componentName&&(0,n.jsx)(u.E.div,{className:v().box,layoutId:"underline",style:{width:s.length>0?"99%":void 0}})]},a))}),!!s.length&&(0,n.jsxs)("div",{className:v().dotMenuContainer,children:[(0,n.jsx)("div",{className:v().dotMenu,onClick:()=>{g(e=>!e)},children:(0,n.jsx)(_.Z,{className:d()(v().dotMenuIcon,{[v().blue]:c||y}),name:"Dotmenu"})}),c&&(0,n.jsx)("div",{className:v().truncateMenu,children:h.map((e,a)=>s.includes(e.componentName)?(0,n.jsxs)("div",{className:d()(v().truncateItem,{[v().active]:e.componentName===t}),onClick:()=>{handleClick(e.componentName,e.tabId),g(!1),x(!0)},children:[(0,n.jsx)(_.Z,{className:v().icon,name:e.icon}),(0,n.jsx)(p.Z,{className:v().truncateLabel,children:i(e.label)})]},a):null)})]})]})})};UserPageNavigationLarge.displayName="UserPageNavigationLarge";var x=a(65239),b=a(52559),C=a.n(b);let UserPageNavigationSmall=e=>{let{activeComponent:t,setActiveComponent:a}=e,{t:i}=(0,m.QT)(),[s,l]=(0,r.useState)(!1),c=(0,o.useRouter)(),handleClick=(e,t)=>{if(c.asPath){let e=c.asPath.split("#");t?c.push("".concat(e[0],"#").concat(t)):c.push("".concat(e[0]))}a(e)};return(0,n.jsxs)(x.M,{initial:!1,children:[(0,n.jsx)("div",{className:C().fadeBackgroun
1d}),(0,n.jsx)(u.E.div,{animate:s?{background:"rgba(0, 0, 0, 0.5)",transition:{delay:.3,ease:"linear"}}:{background:"transparent"},className:d()(C().component,{[C().isOpen]:s}),onClick:()=>{s&&l(!1)},children:(0,n.jsx)("div",{className:C().contentContainer,children:(0,n.jsxs)(u.E.div,{animate:s?{height:"auto",paddingBottom:"8px",transition:{delay:.3,type:"tween"}}:{height:0,paddingBottom:0,transition:{duration:.5}},className:C().content,children:[h.map((e,a)=>(0,n.jsxs)(u.E.div,{animate:s?{opacity:1,width:"100%"}:{opacity:t!==e.componentName&&s?0:1,transition:{delay:.5,type:"tween"},width:"0%"},className:d()(C().contentItem,{[C().isActive]:t===e.componentName}),layout:!0,layoutDependency:s,onClick:()=>{l(e=>!e),handleClick(e.componentName,e.tabId)},transition:{duration:.25,type:"tween"},children:[(0,n.jsx)(_.Z,{name:e.icon}),(0,n.jsx)(p.Z,{className:C().contentLabel,tagStyle:t===e.componentName?"bodyMediumBold":"bodyMedium",children:i(e.label)}),t===e.componentName&&(0,n.jsx)(u.E.div,{animate:s?{rotate:-180}:{rotate:0},className:C().contentChevronUp,transition:{delay:.3,duration:.2},children:(0,n.jsx)(_.Z,{name:"ChevronUp"})},"contentChevronUp-".concat(a))]},a)),(0,n.jsx)(u.E.div,{animate:s?{opacity:1}:{opacity:0,transition:{duration:.5}},className:C().cardBackground},"user-page-navigation-small-cardBackground")]},"user-page-navigation-small-contentContainer")})},"user-page-navigation-small-component")]})};UserPageNavigationSmall.displayName="UserPageNavigationSmall";var S=a(50087),N=a(75306),j=a.n(N);let UserPageNavigation=e=>{let{activeComponent:t,setActiveComponent:a}=e,o=(0,S.i)(parseInt(j().tablet));return(0,n.jsxs)(r.Fragment,{children:[o&&(0,n.jsx)(UserPageNavigationLarge,{activeComponent:t,setActiveComponent:a}),!o&&(0,n.jsx)(UserPageNavigationSmall,{activeComponent:t,setActiveComponent:a})]})};UserPageNavigation.displayName="UserPageNavigation";var f=a(54881),w=a(53702),T=a(27999),E=a(16051),P=a(36155),Z=a(71194),M=a(8033),D=a(25237),O=a.n(D);let A=O()(()=>Promise.resolve().then(a.bind(a,36155)),{loadableGenerated:{webpack:()=>[36155]}}),k=O()(()=>Promise.resolve().then(a.bind(a,71194)),{loadableGenerated:{webpack:()=>[71194]}}),R=O()(()=>Promise.resolve().then(a.bind(a,8033)),{loadableGenerated:{webpack:()=>[8033]}}),I=O()(()=>Promise.resolve().then(a.bind(a,16051)),{loadableGenerated:{webpack:()=>[16051]}}),L=O()(()=>a.e(1566).then(a.bind(a,71566)),{loadableGenerated:{webpack:()=>[71566]}}),B=O()(()=>a.e(240).then(a.bind(a,70240)),{loadableGenerated:{webpack:()=>[70240]}}),H={UserCryoStorage:I,UserHome:A,UserMyDonor:k,UserOrderHistory:L,UserSettings:B,UserTreatment:R};var U=a(19180),Y=a(97351),W=a(58187),Q=a.n(W);let UserDetails=e=>{let{blogPostsCardSlider:t,bookConsultationLink:a,cryoStorageSettings:i,guidanceSlider:s,myDonorsSettings:c,treatmentSettings:d}=e,{status:u}=(0,l.useSession)(),m=(0,o.useRouter)(),[_,p]=(0,r.useState)("UserHome"),{component:h}=function(e){let t=H[e];return{component:t}}(_);return(0,r.useEffect)(()=>{g.Z.myPage.showHome||p("UserMyDonor")},[u]),(0,r.useEffect)(()=>{if(m.asPath){let e=m.asPath.split("#"),t=e[e.length-1];switch(t){case"my-donors":if(!g.Z.myPage.showMyDonors)break;p("UserMyDonor");break;case"order-history":if(!g.Z.myPage.showOrderHistory)break;p("UserOrderHistory");break;case"settings":if(!g.Z.myPage.showSettings)break;p("UserSettings");break;case"storage":if(!g.Z.myPage.showStorage)break;p("UserCryoStorage");break;case"treatment-details":if(!g.Z.myPage.showTreatment)break;p("UserTreatment");break;default:if(!g.Z.myPage.showHome)break;p("UserHome")}}},[m]),(0,T.Z)(_,{top:0}),(0,n.jsx)(U.ZP,{value:{activeComponent:_,setActiveComponent:p},children:(0,n.jsx)(w.Z,{className:Q().component,color:"primary",children:(0,n.jsxs)(f.Z,{children:["UserTreatment"===_&&(0,n.jsx)(M.default,{treatmentSettings:d}),"UserHome"===_&&(0,n.jsx)(P.default,{blogPosts:t,bookConsultationLink:a,cryoStorageSettings:i,guidanceSlider:s}),"UserMyDonor"===_&&(0,n.jsx)(Z.default,{myDonorsSettings:c}),"UserCryoStorage"===_&&(0,n.jsx)(E.default,{cryoStorageSettings:i}),"UserTreatment"!==_&&"UserHome"!==_&&"UserCryoStorage"!==_&&"UserMyDonor"!==_&&(0,n.jsx)(h,{}),(0,n.jsx)(UserPageNavigation,{activeComponent:_,setActiveComponent:p}),(0,n.jsx)(Y.Z,{isOpen:"unauthenticated"===u})]})})})};UserDetails.displayName="UserDetails";var F=a(6945),G=a(2601),V=a(19350),J=!0,user=e=>{let t=(0,o.useRouter)();return((0,r.useEffect)(()=>{(0,G._o)({login_status:e.customerId?"logged in":"not logged in",user_id:e.customerId?"CID_".concat(e.customerId):void 0})},[e]),(0,F._)(e))?(0,n.jsx)(s.Z,{modules:(0,V.errorModuleList)(t.locale,e.message)}):(0,n.jsx)(i.Z,{...e,children:(0,n.jsx)(UserDetails,{blogPostsCardSlider:e.blogPostsCardSlider,bookConsultationLink:e.bookConsultationLink,cryoStorageSettings:e.cryoStorageSettings,guidanceSlider:e.guidanceSlider,myDonorsSettings:e.myDonorsSettings,treatmentSettings:e.treatmentSettings})})}},16897:function(e,t,a){"use strict";var n=a(52322),o=a(12524),r=a.n(o),i=a(5632),s=a(50639),l=a(2784),c=a(1786),d=a(78167),u=a(79207),m=a(17289),_=a(78576),p=a(30075),g=a(89785),h=a(67709),y=a(50087),v=a(75306),x=a.n(v),b=a(94533),C=a.n(b);let S=(0,l.forwardRef)((e,t)=>{let{className:a,displayFullBodyText:o=!1,headline:v,image:b,label:S,link:N,metadata:j,target:f,text:w,useLinkTextAsCtaText:T=!1}=e,{t:E}=(0,s.QT)(),P=(0,y.i)(parseInt(x().laptop)),Z=(0,i.useRouter)(),M={day:"numeric",month:"long",year:"numeric"},D=(0,n.jsxs)(l.Fragment,{children:[b&&(0,n.jsx)("div",{className:C().imageWrapper,children:(0,n.jsx)(d.Z,{alt:b.altText||"",className:C().image,fill:!0,src:(0,p.e)(b.url,{focalPoint:b.focalPoint,height:315,width:560},"umbraco"),srcSet:[{media:"(max-width: 375px)",url:(0,p.e)(b.url,{focalPoint:b.focalPoint,height:211,width:375},"umbraco")},{media:"(max-width: 768px)",url:(0,p.e)(b.url,{focalPoint:b.focalPoint,height:432,width:768},"umbraco")}],unoptimized:!0})}),(0,n.jsxs)("div",{className:C().content,children:[!P&&j&&(0,n.jsxs)("div",{className:C().topContainer,children:[(0,n.jsx)(m.Z,{tagStyle:"bodySmall",children:(0,g.x)(j.date,Z.locale,M)}),(0,n.jsxs)("div",{className:C().timeContainer,children:[(0,n.jsx)(c.Z,{className:C().icon,name:"Time"}),(0,n.jsx)(m.Z,{tagStyle:"bodySmall",children:j.readingTime})]})]}),(0,n.jsxs)("div",{children:[S&&(0,n.jsx)(m.Z,{className:C().label,tag:"p",tagStyle:"caption",children:S}),v&&(0,n.jsx)(m.Z,{className:C().headline,tag:"h3",tagStyle:"headlineXSmall",text:(0,h.Z)(v)})]}),w&&(0,n.jsx)("div",{className:C().paragraphContainer,children:(0,n.jsx)(u.Z,{text:w})}),j&&(0,n.jsxs)("div",{className:C().bottomContainer,children:[(0,n.jsxs)("div",{className:C().authorContainer,children:[j.image&&(0,n.jsx)("div",{className:C().authorImageWrapper,children:(0,n.jsx)(d.Z,{alt:"",className:C().authorImage,fill:!0,src:j.image})}),(0,n.jsx)(m.Z,{tagStyle:"bodySmall",children:j.name})]}),P&&(0,n.jsxs)("div",{className:C().dateContainer,children:[(0,n.jsx)(m.Z,{tagStyle:"bodySmall",children:(0,g.x)(j.date,Z.locale,M)}),(0,n.jsx)("div",{className:C().divider}),(0,n.jsx)(c.Z,{className:C().icon,name:"Time"}),(0,n.jsx)(m.Z,{tagStyle:"bodySmall",children:j.readingTime})]})]}),(null==N?void 0:N.url)!=="#"&&(0,n.jsxs)("div",{className:C().readMoreLink,children:[(0,n.jsx)(m.Z,{text:N.text&&T?N.text:E("commons.readMore")}),(0,n.jsx)(c.Z,{className:C().readMoreIcon,name:"ChevronRight",size:16})]})]})]});return(null==N?void 0:N.url)!=="#"?(0,n.jsx)(_.Z,{className:r()(C().component,a,{[C().isFullBodyTextDisplayed]:o}),ref:t,target:f,url:N.url,children:D}):(0,n.jsx)("div",{className:r()(C().component,a,{[C().isFullBodyTextDisplayed]:o}),ref:t,children:D})});
1S.displayName="Card",t.Z=S},96416:function(e,t,a){"use strict";var n=a(52322),o=a(52977),r=a(90740),i=a(41633),s=a(12524),l=a.n(s),c=a(28879),d=a.n(c),u=a(92547),m=a.n(u),_=a(50639),p=a(2784),g=a(14235),h=a(1786),y=a(17289),v=a(37386),x=a(42141),b=a(65679),C=a(91253),S=a.n(C);d().extend(m());let DatePicker=e=>{let{className:t,defaultValue:a,disableClickOutsideClosure:s=!1,disabled:c=!1,disableDates:u=[],disableFuture:m=!1,disablePast:C=!1,disableWeekends:N=!1,error:j,isDateOfBirth:f=!1,isLocked:w=!1,label:T,maxDate:E,minDate:P,onChange:Z,title:M,usePortal:D=!1,value:O}=e,{t:A}=(0,_.QT)(),[k,R]=(0,p.useState)(!1),I=f?"year":"day",[L,B]=(0,p.useState)(I),[H,U]=(0,p.useState)(a?d()(a):null);(0,p.useEffect)(()=>{let e=document.querySelector(".MuiPickersCalendarHeader-label");"year"===L&&e&&(e.innerHTML=A("commons.year"))},[L]);let overlayContent=()=>(0,n.jsx)(x.Z,{disableClickOutsideClosure:s,isOpen:k,onClose:()=>R(!1),position:"right",children:(0,n.jsxs)("div",{className:S().overlayItem,children:[(0,n.jsxs)("div",{className:S().overlayHeadline,children:[(0,n.jsx)(y.Z,{tagStyle:"headlineSmall",children:M}),(0,n.jsx)("div",{className:S().overlayClose,onClick:()=>R(!1),children:(0,n.jsx)(h.Z,{name:"Close"})})]}),"year"===L&&(0,n.jsx)("div",{className:S().datePickerShadowTop}),(0,n.jsx)(i._,{dateAdapter:r.y,dateFormats:{monthAndYear:"year"===L?"YYYY":"month"===L?"YYYY":"MMMM YYYY",monthShort:"MMMM"},children:(0,n.jsx)(o.w,{className:S().dateCalendar,dayOfWeekFormatter:(e,t)=>{var a;let n=[A("commons.weekdayShort.sunday"),A("commons.weekdayShort.monday"),A("commons.weekdayShort.tuesday"),A("commons.weekdayShort.wednesday"),A("commons.weekdayShort.thursday"),A("commons.weekdayShort.friday"),A("commons.weekdayShort.saturday")];return null!==(a=n[d()(t).weekday()])&&void 0!==a?a:""},defaultValue:a?d()(a):void 0,disabled:c,disableFuture:m,disablePast:C,maxDate:E?d()(E):void 0,minDate:P?d()(P):void 0,onChange:e=>{U(e)},onViewChange:e=>{B(e)},openTo:I,shouldDisableDate:e=>u.includes(e.format("YYYY-MM-DD"))||N&&0===e.day()||N&&6===e.day(),showDaysOutsideCurrentMonth:!0,value:O?d()(O):d()(H),view:L,views:["year","month","day"]})}),"year"===L&&(0,n.jsx)("div",{className:S().datePickerShadowBottom}),(0,n.jsx)("div",{className:S().buttonWrapper,children:(0,n.jsx)(g.Z,{className:S().button,onClick:()=>{R(!1),Z(String(d()(H).format("YYYY-MM-DD")))},text:A("checkoutPage.treatment.whenIsYourTreatmentDate.selectDate"),variant:"primary"})})]})});return(0,n.jsxs)("div",{className:l()(S().component,t,{[S().hasError]:j,[S().isLocked]:w}),children:[(0,n.jsxs)("button",{className:S().input,onClick:()=>R(!0),children:[(0,n.jsx)(v.Z,{className:S().field,disabled:c||w,error:j,isDatePickerWithPlaceholder:!O,placeholder:T,value:O&&d()(O).format("DD/MM/YYYY")}),(0,n.jsx)(h.Z,{className:S().inputIcon,name:w?"Lock":"Calendar"})]}),D?(0,n.jsx)(b.Z,{children:(0,n.jsx)("div",{className:S().component,onMouseDown:e=>e.stopPropagation(),children:overlayContent()})}):overlayContent()]})};DatePicker.displayName="DatePicker",t.Z=DatePicker},85209:function(e,t,a){"use strict";var n=a(52322),o=a(12524),r=a.n(o),i=a(2784),s=a(88525),l=a(1786),c=a(17289),d=a(99163),u=a(99105),m=a.n(u);let _=(0,i.forwardRef)((e,t)=>{let{className:a,color:o,disabled:u,error:_,isLocked:p=!1,label:g,onChange:h,options:y,...v}=e,x=(0,i.useId)(),[b,C]=(0,i.useState)(e.value),[S,N]=(0,i.useState)([]),[j,f]=(0,i.useState)(!1),[w,T]=(0,i.useState)("bottom"),E=(0,i.useRef)(null),P=(0,i.useRef)(null),Z=(0,i.useRef)(null),M=(0,i.useId)();return(0,d.Z)(E,()=>{f(!1)}),(0,i.useEffect)(()=>{b&&h&&h(b)},[b]),(0,i.useEffect)(()=>{e.value&&void 0===b&&C(e.value)},[e.value,b]),(0,i.useEffect)(()=>{if(!E.current||!P.current)return;let e=P.current.clientHeight,t=window.innerHeight-E.current.getBoundingClientRect().bottom;e>t?T("top"):T("bottom")},[P,j,E]),(0,n.jsxs)("div",{className:r()(m().component,a,{[m().hasError]:_,[m().hasValue]:!!b,[m().isDisabled]:u||p}),"data-color":o,ref:E,children:[g&&(0,n.jsx)(c.Z,{className:m().label,id:"dropdown-label-".concat(x),tagStyle:b?"bodySmall":"bodyMedium",children:g}),(0,n.jsxs)("div",{ref:t,...v,"aria-activedescendant":(null==b?void 0:b.value)?"dropdown-option-".concat(x,"-").concat(b.value):void 0,"aria-controls":"dropdown-listbox-".concat(x),"aria-expanded":j,"aria-haspopup":"listbox","aria-labelledby":"dropdown-label-".concat(x),className:r()(m().field,{[m().isOpen]:j}
1),onClick:()=>{var e;f(!j),null===(e=Z.current)||void 0===e||e.focus()},onKeyDown:e=>{if("Tab"!==e.key&&e.preventDefault(),"Enter"===e.key){if(b&&j){f(!1);return}f(!0)}else if("Escape"===e.key)f(!1);else if("ArrowUp"===e.key||"ArrowDown"===e.key){if(b){if(!y)return;let t=y.indexOf(b),a=y.length-1;"ArrowUp"===e.key&&t>0?C(y[t-1]):"ArrowDown"===e.key&&t<a&&C(y[t+1])}else{if(!y||"ArrowUp"===e.key)return;C(y[0])}}else{if(!y)return;let n=y.filter(e=>!S.includes(e)).find(t=>t.text.charAt(0).toLowerCase()===e.key.toLowerCase());if(n){var t,a;let o=y.indexOf(n);C(y[o]),0===S.length||e.key.toLowerCase()===(null===(a=S[0])||void 0===a?void 0:null===(t=a.text)||void 0===t?void 0:t.charAt(0).toLowerCase())?N(e=>[...e,y[o]]):N([])}else N([])}},role:"combobox",tabIndex:u?-1:0,children:[(null==b?void 0:b.icon)&&(0,n.jsx)(l.Z,{className:m().icon,name:b.icon}),(null==b?void 0:b.flagIcon)&&(0,n.jsx)(s.Z,{className:m().icon,name:b.flagIcon}),b&&(0,n.jsx)(c.Z,{className:m().value,tagStyle:"bodyMedium",children:b.text}),p?(0,n.jsx)(l.Z,{className:m().lockIcon,name:"Lock"}):(0,n.jsx)(l.Z,{className:r()(m().chevron,m().icon),name:j?"ChevronUp":"ChevronDown"})]}),g&&!!b&&(0,n.jsx)(c.Z,{className:m().labelBackground,tagStyle:"bodySmall",children:g}),j&&(0,n.jsx)("div",{className:r()(m().optionWrapper,{[m().isBottom]:"bottom"===w,[m().isTop]:"top"===w}),ref:P,children:(0,n.jsx)("ul",{className:m().listContainer,id:"dropdown-listbox-".concat(x),role:"listbox",children:null==y?void 0:y.map(e=>(0,n.jsxs)("li",{"aria-selected":(null==b?void 0:b.value)===e.value,className:r()(m().listItem,{[m().isActive]:(null==b?void 0:b.value)===e.value}),id:"dropdown-option-".concat(x,"-").concat(e.value),onClick:()=>{C(e),f(!1)},role:"option",children:[e.icon&&(0,n.jsx)(l.Z,{name:e.icon}),e.flagIcon&&(0,n.jsx)(s.Z,{name:e.flagIcon}),(0,n.jsx)(c.Z,{className:m().text,tagStyle:"bodyMedium",children:e.text})]},e.value))})}),_&&(0,n.jsx)(c.Z,{className:m().error,id:"".concat(M,"-error"),role:"alert",tagStyle:"bodySmall",children:_})]})});_.displayName="Dropdown",t.Z=_},3212:function(e,t,a){"use strict";a.d(t,{a:function(){return o}});var n,o,r=a(52322),i=a(12524),s=a.n(i),l=a(2784),c=a(62202),d=a(1786),u=a(79207),m=a(17289),_=a(51813),p=a.n(_);(n=o||(o={})).notificationsError="notificationsError",n.notificationsGeneral="notificationsGeneral",n.notificationsSuccess="notificationsSuccess",n.notificationsWarning="notificationsWarning";let Notifications=e=>{let{children:t,className:a,type:n,id:o,footerText:i,headline:_,onFooterTextClick:g,message:h,onClose:y}=e;return(0,l.useEffect)(()=>()=>{y&&y()},[]),(0,r.jsx)("div",{className:s()(p().component,a,{[p().isSuccess]:"success"===n,[p().isWarning]:"warning"===n,[p().isError]:"error"===n,[p().isGeneral]:"general"===n}),children:(0,r.jsxs)("div",{className:p().notificationContent,children:[(0,r.jsx)(d.Z,{className:p().leftIcon,name:(()=>{switch(n){case"success":return"CheckmarkEmpty";case"warning":return"Disclaimer";case"error":return"Warning";default:return"Information"}})()}),(0,r.jsxs)("div",{children:[_&&(0,r.jsx)(m.Z,{className:p().headline,tag:"p",tagStyle:"bodyMediumBold",children:_}),h&&(0,r.jsx)(u.Z,{className:p().text,text:h}),t&&t,i&&(0,r.jsx)("button",{onClick:g,children:(0,r.jsx)(m.Z,{className:p().footerText,tag:"p",tagStyle:"bodyMedium",children:i})})]}),(0,r.jsx)("div",{onClick:()=>{c.ZP.dismiss(o)},children:(0,r.jsx)(d.Z,{className:p().rightIconClose,name:"Close"})})]})})};Notifications.displayName="Notifications",t.Z=Notifications},62916:function(e,t,a){"use strict";var n=a(52322),o=a(12524),r=a.n(o),i=a(2784),s=a(1786),l=a(17289),c=a(78576),d=a(15306),u=a.n(d);let m=(0,i.forwardRef)((e,t)=>{let{disabled:a,iconLeft:o,iconRight:i,text:d,variant:m="small",..._}=e;return(0,n.jsxs)(c.Z,{ref:t,className:r()(u().component,{[u().isDisabled]:a}),..._,children:[o&&(0,n.jsx)(s.Z,{className:u().icon,name:o}),d&&(0,n.jsx)(l.Z,{className:u().text,tagStyle:"small"===m?"bodyMedium":"bodyLarge",text:d}),i&&(0,n.jsx)(s.Z,{className:u().icon,name:i})]})});m.displayName="TextLink",t.Z=m},72136:function(e,t,a){"use strict";var n=a(52322),o=a(12524),r=a.n(o);a(2784);var i=a(29183),s=a(78167),l=a(17289),c=a(30075),d=a(46527),u=a.n(d);let Tout=e=>{let{className:t,headline:a,image:o,imageAlign:d="center",link:m}=e;return(0,n.jsx)("div",{className:r()(u().component,t),children:(0,n.jsxs)("div",{className:u().inner,children:[(0,n.jsxs)("div",{className:r()(u().texts,{[u().hasTextLink]:!!m.text}),children:[(0,n.jsx)(l.Z,{className:u().headLine,tag:"h3",tagStyle:"bodyLarge",variant:"medium",children:a}),(0,n.jsx)(i.Z,{className:u().link,href:m.url,icon:"ChevronRight",iconPosition:"right",text:m.text})]}),(0,n.jsx)("div",{className:r()(u().imageContainer,"".concat(d)),children:(0,n.jsx)("div",{className:u().imageInner,children:(0,n.jsx)(s.Z,{alt:o.altText||"",className:u().image,src:(0,c.e)(o.url,{height:375,width:375},"umbraco"),srcSet:[{media:"(max-width: 768px)",url:(0,c.e)(o.url,{height:375,width:375},"umbraco")}],unoptimized:!0})})})]})})};Tout.displayName="Tout",t.Z=Tout},28624:function(e,t,a){"use strict";var n=a(52322),o=a(12524),r=a.n(o);a(2784);var i=a(78167),s=a(79207),l=a(17289),c=a(27858),d=a(10416),u=a(24450),m=a(28184),_=a(30075),p=a(90691),g=a.n(p);let IntroText=e=>{let{buttons:t,className:a,content:o,headline:p,image:h,visual:y}=e;return(0,n.jsx)("div",{className:r()(g().component,a),children:(0,n.jsxs)(m.Z,{children:[(0,n.jsx)(u.Z,{className:g().imageColumn,width:{laptop:5,tablet:4},children:(0,n.jsxs)("div",{className:g().imageWrapper,children:[h&&(0,n.jsx)(i.Z,{alt:"",className:g().image,src:(0,_.e)(h.url,{height:768,width:768},"umbraco"),srcSet:[{media:"(max-width: 768px)",url:(0,_.e)(h.url,{height:768,width:768},"umbraco")}],unoptimized:!0}),y&&(0,n.jsx)("div",{className:g().visualContainer,children:(0,n.jsx)("div",{className:g().visual,children:(0,n.jsx)(c.Z,{name:y})})})]})}),(0,n.jsxs)(u.Z,{className:g().textColumn,offset:{tablet:1},width:{laptop:6,tablet:7},children:[p&&(0,n.jsx)(l.Z,{className:g().headline,tagStyle:"headlineXSmall",children:p}),(0,n.jsx)(s.Z,{className:g().content,text:o}),t&&(0,n.jsx)(d.Z,{items:t})]})]})})};IntroText.displayName="IntroText",t.Z=IntroText},81829:function(e,t,a){"use strict";var n=a(52322);a(2784);var o=a(1786),r=a(79207),i=a(36519),s=a.n(i);let TermsAndConditions=e=>{let{content:t,onClose:a}=e;
1return(0,n.jsxs)("div",{className:s().component,children:[(0,n.jsx)("span",{className:s().closeIcon,onClick:()=>a(!1),children:(0,n.jsx)(o.Z,{name:"Close"})}),(0,n.jsx)("div",{className:s().content,children:(0,n.jsx)(r.Z,{text:null!=t?t:""})})]})};TermsAndConditions.displayName="TermsAndConditions",t.Z=TermsAndConditions},76251:function(e,t,a){"use strict";var n=a(52322),o=a(5632),r=a(23848),i=a(50639),s=a(2784),l=a(14235),c=a(17289),d=a(42141),u=a(11775),m=a(47343),_=a(53800),p=a.n(_);let ChangeTreatmentOverlay=e=>{var t;let{donorCountryCode:a,donorTreatmentCountry:_,isOpen:g,onClose:h,onQueryReset:y}=e,{t:v}=(0,i.QT)(),[x,b]=(0,s.useState)(!1),{data:C}=(0,r.useSession)(),S=(0,o.useRouter)(),N=null==C?void 0:null===(t=C.user)||void 0===t?void 0:t.bearer_token,{data:j}=(0,m.t2)(N,S.locale),{isLoading:f,isSuccess:w,mutate:T,reset:E}=(0,u.d)(N,S.locale);(0,s.useEffect)(()=>{w&&b(!0)},[w]),(0,s.useEffect)(()=>{!f&&w&&(E(),y(),h())},[f,w]);let P=v("myPage.cryostorage.changeTreatment.text").replaceAll("%country%",_||"%country%");return(0,n.jsx)(d.Z,{className:p().component,containerClassName:p().overlayContainer,contentClassName:p().overlayContent,disableClickOutsideClosure:!0,isOpen:g,children:(0,n.jsxs)("div",{className:p().container,children:[(0,n.jsx)("div",{className:p().headerContainer,children:(0,n.jsx)(c.Z,{tagStyle:"headlineSmall",children:v("myPage.cryostorage.changeTreatment.headline")})}),(0,n.jsx)("div",{className:p().textContainer,children:(0,n.jsx)(c.Z,{tagStyle:"bodyMedium",children:P})}),x&&(0,n.jsx)("div",{"aria-atomic":"true",className:p().hidden,role:"status",children:v("accessibility.statusMessages.treatmentCountryUpdated")}),(0,n.jsx)(l.Z,{className:p().button,isLoading:f,onClick:()=>{j&&a&&T({customer:{...j,treatment_country_id:a}})},text:v("myPage.cryostorage.changeTreatment.buttonText"),variant:"tertiary"})]})})};ChangeTreatmentOverlay.displayName="ChangeTreatmentOverlay",t.Z=ChangeTreatmentOverlay},32445:function(e,t,a){"use strict";var n=a(52322),o=a(14235),r=a(17289),i=a(42141),s=a(98163),l=a.n(s);let UserCryoStorageDonorEmptyCartOverlay=e=>{let{cancelText:t,confirmText:a,headline:s,isOpen:c=!1,onClose:d,onConfirm:u,text:m}=e;return(0,n.jsx)(i.Z,{className:l().component,containerClassName:l().overlayContainer,contentClassName:l().overlayContent,isOpen:c,onClose:d,children:(0,n.jsxs)("div",{className:l().contentWrapper,children:[(0,n.jsxs)("div",{className:l().content,children:[s&&(0,n.jsx)(r.Z,{tagStyle:"headlineXSmall",children:s}),m&&(0,n.jsx)(r.Z,{className:l().text,tag:"p",tagStyle:"bodyMedium",children:m})]}),(0,n.jsxs)("div",{className:l().buttons,children:[(0,n.jsx)(o.Z,{onClick:u,text:a,variant:"tertiary"}),(0,n.jsx)(o.Z,{onClick:d,text:t,variant:"quaternary"})]})]})})};UserCryoStorageDonorEmptyCartOverlay.displayName="UserCryoStorageDonorEmptyCartOverlay",t.Z=UserCryoStorageDonorEmptyCartOverlay},63820:function(e,t,a){"use strict";a.d(t,{Z:function(){return K}});var n=a(52322),o=a(50639),r=a(2784),i=a(1786),s=a(42141),l=a(28879),c=a.n(l),d=a(57449),u=a.n(d),m=a(5632),_=a(23848),p=a(14235),g=a(79207),h=a(17289),y=a(82066),v=a(68569),x=a(70850),b=a(31871);let useMutationCancelSubscription=(e,t)=>{let a=(0,y.useQueryClient)(),n=(0,y.useMutation)(async a=>{let n=await v.Z.fetch("en/rest/en/V2/subscription/mine/cancel",{body:JSON.stringify(a),headers:{"Accept-Language":(0,x.D)(t),Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"POST"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationCancelSubscription",e),e});return n},{onError:async e=>e,onSuccess:async()=>{a.invalidateQueries([b.MJ.MY_STORAGE])}});return n};var C=a(30909),S=a(91511),N=a.n(S);let UserCryoStorageSubscriptionOverlayCancel=e=>{var t;let{cryoStorageCancelSubscription:a,onBackButtonClick:s,subscription:l}=e,{t:d}=(0,o.QT)(),{data:y}=(0,_.useSession)(),v=(0,m.useRouter)(),x=null==y?void 0:null===(t=y.user)||void 0===t?void 0:t.bearer_token;c().extend(u()),c().locale(v.locale);let{isSuccess:b,isLoading:S,mutate:j}=useMutationCancelSubscription(x,v.locale),f=(0,r.useMemo)(()=>l.plans.find(e=>"Active"===e.status),[l.plans]);return(0,n.jsxs)("div",{className:N().component,children:[(0,n.jsxs)("div",{className:N().top,children:[!l.reason_code_cancel_disallow.includes("ACTIVE_PLAN_ALREADY_CANCELLED")&&(0,n.jsx)("button",{className:N().backButton,onClick:s,children:(0,n.jsx)(i.Z,{name:"ChevronLeft"})}),(0,n.jsx)(h.Z,{tagStyle:"headlineSmall",children:d("myPage.cryoStorage.donorsOverview.subscription.cancelSubscription")})]}),(0,n.jsx)("div",{className:N().content,children:b?(null==a?void 0:a.subscriptionCancelledText)&&(0,n.jsx)(g.Z,{text:(0,C.m)(a.subscriptionCancelledText,{date:c()(null==f?void 0:f.next_occurrence_date).format("MMMM Do YYYY")})}):l.is_plan_cancellable?(null==a?void 0:a.confirmCancellationText)&&(0,n.jsx)(g.Z,{text:(0,C.m)(a.confirmCancellationText,{date:c()(null==f?void 0:f.next_occurrence_date).format("MMMM Do YYYY")})}):l.reason_code_cancel_disallow.includes("STORAGE_NOT_EMPTY")?(null==a?void 0:a.subscriptionHasStrawsText)&&(0,n.jsx)(g.Z,{text:(0,C.m)(a.subscriptionHasStrawsText,{date:c()(null==f?void 0:f.next_occurrence_date).format("MMMM Do YYYY")})}):l.reason_code_cancel_disallow.includes("BINDING_PERIOD")?(null==a?void 0:a.subscriptionHasActiveBindingPerio
1dText)&&(0,n.jsx)(g.Z,{text:(0,C.m)(a.subscriptionHasActiveBindingPeriodText,{date:c()(null==f?void 0:f.next_occurrence_date).format("MMMM Do YYYY")})}):l.reason_code_cancel_disallow.includes("ACTIVE_PLAN_ALREADY_CANCELLED")?(null==a?void 0:a.subscriptionCancelledText)&&(0,n.jsx)(g.Z,{text:(0,C.m)(a.subscriptionCancelledText,{date:c()(null==f?void 0:f.next_occurrence_date).format("MMMM Do YYYY")})}):(null==a?void 0:a.genericFallbackText)&&(0,n.jsx)(g.Z,{text:a.genericFallbackText})}),l.is_plan_cancellable&&(0,n.jsx)("div",{className:N().cancelSubscriptionButtonWrapper,children:(0,n.jsx)(p.Z,{className:N().cancelSubscriptionButton,isLoading:S,onClick:()=>{f&&j({subscription_id:f.subscription_id})},text:d("myPage.cryoStorage.donorsOverview.subscription.cancelSubscriptionButton")})})]})};UserCryoStorageSubscriptionOverlayCancel.displayName="UserCryoStorageSubscriptionOverlayCancel";var j=a(68602),f=a(76456),w=a(51085),T=a(81924),E=a(81829),P=a(2789),Z=a(6456),M=a(73208),D=a(2475),O=a(40367),A=a(12475),k=a(61047),R=a(71517),I=a(47343),L=a(62453),B=a(17065),H=a(24841),U=a(26591),Y=a(72742),W=a.n(Y);let UserCryoStorageSubscriptionOverlayChangePlan=e=>{var t;let{cryoStorageManageSubscription:a,isStorageExpired:l=!1,onBackButtonClick:d,onPlanChangeSuccess:u,storageExpiryDate:y,subscription:v}=e,{t:x}=(0,o.QT)(),{data:b}=(0,_.useSession)(),S=(0,m.useRouter)(),N=null==b?void 0:null===(t=b.user)||void 0===t?void 0:t.bearer_token,{formatPrice:Y}=(0,U.z)(),[Q,F]=(0,r.useState)(null),{data:G}=(0,I.t2)(N,S.locale),V=(0,r.useRef)(null),[J,z]=(0,r.useState)("overview"),[q,X]=(0,r.useState)(!1),[K,$]=(0,r.useState)(null),[ee,et]=(0,r.useState)(!1),[ea,en]=(0,r.useState)(!1),[eo,er]=(0,r.useState)(null),[ei,es]=(0,r.useState)(!1),[el,ec]=(0,r.useState)(!1),[ed,eu]=(0,r.useState)(!1),[em,e_]=(0,r.useState)(!1),[ep,eg]=(0,r.useState)(!1),[eh,ey]=(0,r.useState)(null),{data:ev}=(0,B.F)(N,S.locale),[ex,eb]=(0,r.useState)(null),{isLoading:eC,mutate:eS}=(0,O.T)(N,S.locale),{isLoading:eN,mutate:ej}=(0,D.o)(N,S.locale),{data:ef}=(0,R.k)(N,S.locale),{mutate:ew}=(0,A.y)(N),{data:eT}=(0,L.Q)({token:N},!!N),{data:eE}=(0,k.B)(),{data:eP,refetch:eZ}=(0,H.O)({orderId:null!=eh?eh:void 0},N,S.locale),{mutate:eM}=(0,M.U)(N,S.locale),{isLoading:eD,mutate:eO}=(0,Z.w)(N,S.locale),{isLoading:eA,mutate:ek}=(0,P.s)(N),destroyReepayInstance=()=>{try{var e;null===(e=V.current)||void 0===e||e.destroy()}finally{V.current=null}},eR=(0,r.useCallback)(e=>{var t,a,n,o;return"TERMS_AND_CONDITIONS_OF_PURCHASE"===e?null==ef?void 0:null===(t=ef.agreements.find(e=>"TERMS_AND_CONDITIONS_OF_PURCHASE"===e.key))||void 0===t?void 0:t.html:"PREGNANCY_SLOT_AGREEMENT"===e?null==ef?void 0:null===(a=ef.agreements.find(e=>"PREGNANCY_SLOT_AGREEMENT"===e.key))||void 0===a?void 0:a.html:"PRIVACY_POLICY"===e?null==ef?void 0:null===(n=ef.agreements.find(e=>"PRIVACY_POLICY"===e.key))||void 0===n?void 0:n.html:"TERMS_AND_CONDITIONS_FOR_STORAGE_OF_DONOR_SPERM"===e?null==ef?void 0:null===(o=ef.agreements.find(e=>"TERMS_AND_CONDITIONS_FOR_STORAGE_OF_DONOR_SPERM"===e.key))||void 0===o?void 0:o.html:void 0},[ef]),eI=(0,r.useMemo)(()=>{let e=null==v?void 0:v.plans.find(e=>"Active"===e.status&&e.is_future),t=null==ev?void 0:ev.items.find(t=>t.sku===(null==e?void 0:e.product_sku));return t},[null==ev?void 0:ev.items,null==v?void 0:v.plans]);(0,r.useEffect)(()=>{(null==v?void 0:v.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED"))&&(z("success"),eI&&F(eI))},[null==v?void 0:v.reason_code_change_disallow,eI]),(0,r.useEffect)(()=>{!V.current&&window.Reepay&&(V.current=new window.Reepay.ModalCheckout)},[]);let eL=(0,r.useCallback)(()=>{z("success"),destroyReepayInstance(),ej({onlyDonorProducts:!1}),null==u||u(),eg(!1)},[ej,u]);(0,r.useEffect)(()=>{eP&&l&&eL()},[eP,l]);let eB=(0,r.useCallback)(()=>{l?eS({paymentMethod:{method:"reepay_payment"}},{onSuccess:e=>{et(!0),eb(e)}}):eM({paymentMethod:{method:"free"}},{onSuccess:eL})},[l,eS,eM,eL]),eH=(0,r.useCallback)(()=>{var e;if(!G)return;let t=G.addresses[0];ek({address:{city:(null==t?void 0:t.city)||"",country_id:G.residence_country_id,customer_id:G.id,email:G.email,firstname:G.firstname,lastname:G.lastname,postcode:(null==t?void 0:t.postcode)||"",region:(null==t?void 0:null===(e=t.region)||void 0===e?void 0:e.region)||"",region_code:"",region_id:0,street:[(null==t?void 0:t.street[0])||""],telephone:(null==t?void 0:t.telephone)||""},useForShipping:!0},{onSuccess:eB})},[G,ek,eB]),eU=(0,r.useCallback)(()=>{var e,t;eO({cartItem:{qty:1,quote_id:null!==(e=null==eE?void 0:eE.id.toString())&&void 0!==e?e:"",sku:null!==(t=null==Q?void 0:Q.sku)&&void 0!==t?t:""}},{onSuccess:eH})},[null==eE?void 0:eE.id,null==Q?void 0:Q.sku,eO,eH]);(0,r.useEffect)(()=>{let e;if(!v&&l&&!ex||!v&&!ee||v&&!ea||v&&!eT)return;l?e=ex:(v||ee)&&(e=null==eT?void 0:eT.session_id);let t=V.current;if(!window.Reepay||!t||!e)return;let a="string"==typeof e?e:String(e);eo!==a&&(t.show(e,{showReceipt:!1}),er(a),t.addEventHandler(window.Reepay.Event.Accept,e=>{destroyReepayInstance(),eg(!0),l?e.invoice?(ey(e.invoice),eZ()):(eg(!1),z("overview")):ew({payment_token:e.payment_method},{onSuccess:()=>{eU()}})}),t.addEventHandler(window.Reepay.Event.Cancel,()=>{z("overview"),et(!1),eb(null),en(!1),er(null),eg(!1),destroyReepayInstance()}))},[eT,ee,v,ew,eU,l,eZ,ex,ea,eo]);let handleSetSubscription=()=>{var e,t;eO({cartItem:{qty:1,quote_id:null!==(e=null==eE?void 0:eE.id.toString())&&void 0!==e?e:"",sku:null!==(t=null==Q?void 0:Q.sku)&&void 0!==t?t:""}},{onSuccess:eH})},getStorageItemLabel=e=>
1{if(e)return x("cryoStorage.storageShortNameDescripter_".concat(e.sku))},eY=(0,r.useMemo)(()=>{let e=null==ef?void 0:ef.agreements.find(e=>"TERMS_AND_CONDITIONS_OF_PURCHASE"===e.key),t=null==ef?void 0:ef.agreements.find(e=>"PRIVACY_POLICY"===e.key),a=null==ef?void 0:ef.agreements.find(e=>"TERMS_AND_CONDITIONS_FOR_STORAGE_OF_DONOR_SPERM"===e.key),n=null==ef?void 0:ef.agreements.find(e=>"PREGNANCY_SLOT_AGREEMENT"===e.key);return n?(0,C.m)(x("checkoutPage.orderSummary.termsAndConditionsLabel.pregnancySlotText"),{PREGNANCY_SLOT_AGREEMENT:'<span id="pregnancyTerms">'.concat(n.title,"</span>"),PRIVACY_POLICY:t?'<span id="privacyPolicy">'.concat(null==t?void 0:t.title,"</span>"):"",TERMS_AND_CONDITIONS_FOR_STORAGE_OF_DONOR_SPERM:a?'<span id="storageSubscription">'.concat(null==a?void 0:a.title,"</span>"):"",TERMS_AND_CONDITIONS_OF_PURCHASE:'<span id="termsAndConditions">'.concat(null==e?void 0:e.title,"</span>")}):(0,C.m)(x("checkoutPage.orderSummary.termsAndConditionsLabel.text"),{PRIVACY_POLICY:t?'<span id="privacyPolicy">'.concat(null==t?void 0:t.title,"</span>"):"",TERMS_AND_CONDITIONS_FOR_STORAGE_OF_DONOR_SPERM:a?'<span id="storageSubscription">'.concat(null==a?void 0:a.title,"</span>"):"",TERMS_AND_CONDITIONS_OF_PURCHASE:'<span id="termsAndConditions">'.concat(null==e?void 0:e.title,"</span>")})},[ef]);(0,r.useEffect)(()=>{let e=null==v?void 0:v.plans.find(e=>"Active"===e.status),t=null==ev?void 0:ev.items.find(t=>t.sku===(null==e?void 0:e.product_sku)),a=null==ev?void 0:ev.items.filter(e=>e.sku!==(null==t?void 0:t.sku));$(a||null)},[null==ev?void 0:ev.items,v]);let eW=(0,r.useMemo)(()=>{var e;let t=null==v?void 0:null===(e=v.plans.find(e=>e.product_sku===(null==eI?void 0:eI.sku)))||void 0===e?void 0:e.start_date;return eI?c()(t).format("DD/MM/YYYY"):l?c()().format("DD/MM/YYYY"):c()(y).format("DD/MM/YYYY")},[eI,l,y,null==v?void 0:v.plans]),eQ=(0,r.useMemo)(()=>{switch(J){case"overview":return x("myPage.cryoStorage.donorsOverview.subscription.changePlan");case"confirmation":return x("myPage.cryoStorage.donorsOverview.subscription.confirmNewPlan");case"success":return x("myPage.cryoStorage.donorsOverview.subscription.planChangeSuccess")}},[J,x]),eF=(0,r.useMemo)(()=>{if(!v)return!1;let e=v.plans.filter(e=>e.is_future);return 1===e.length&&v.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED")},[v]),eG=(0,r.useMemo)(()=>("overview"!==J||null!=v&&!!v.plans.length)&&!eF,[eF,v,J]);return(0,n.jsxs)("div",{className:W().component,children:[(0,n.jsxs)("div",{className:W().top,children:[eG&&(0,n.jsx)("button",{className:W().backButton,onClick:()=>{("overview"===J||"success"===J)&&d(),"confirmation"===J&&(z("overview"),en(!1))},children:(0,n.jsx)(i.Z,{name:"ChevronLeft"})}),(0,n.jsx)(h.Z,{className:W().headline,tagStyle:"headlineSmall",children:eQ})]}),"overview"===J?(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("div",{className:W().subscriptionPlans,children:null==K?void 0:K.map((e,t)=>(0,n.jsx)(T.Z,{additionalText:"".concat(e.extension_attributes.price.currency_code," ").concat(Y(e.extension_attributes.price.price_including_tax)),isChecked:(null==Q?void 0:Q.name)===e.name,onChange:()=>{F(e)},text:getStorageItemLabel(e),title:x("cryoStorage.storageShortName_".concat(e.sku)),value:e.sku},t))}),(0,n.jsx)("div",{className:W().changePlanButtonWrapper,children:(0,n.jsx)(p.Z,{className:W().changePlanButton,disabled:!Q,onClick:()=>{z("confirmation")},text:x("myPage.cryoStorage.donorsOverview.subscription.changePlan")})})]}):"confirmation"===J?ep?(0,n.jsx)(f.Z,{}):(0,n.jsxs)(r.Fragment,{children:[(0,n.jsxs)("div",{className:W().planConfirmation,children:[(null==a?void 0:a.confirmNewPlanText)&&(0,n.jsx)(g.Z,{text:a.confirmNewPlanText}),(0,n.jsxs)("div",{className:W().planOverview,children:[(0,n.jsxs)("div",{className:W().plan,children:[(0,n.jsxs)("div",{className:W().header,children:[(0,n.jsx)(h.Z,{children:x("myPage.cryoStorage.donorsOverview.subscription.plan")}),(0,n.jsx)(h.Z,{tagStyle:"caption",children:"".concat(null==Q?void 0:Q.extension_attributes.price.currency_code," ").concat(Y(null==Q?void 0:Q.extension_attributes.price.price_including_tax))})]}),(0,n.jsx)(h.Z,{tagStyle:"bodyMediumBlogBold",children:x("cryoStorage.storageShort
1Name_".concat(null==Q?void 0:Q.sku))}),(0,n.jsx)(h.Z,{className:W().label,tagStyle:"bodySmall",children:getStorageItemLabel(Q)})]}),(0,n.jsxs)("div",{className:W().plan,children:[(0,n.jsx)("div",{className:W().header,children:(0,n.jsx)(h.Z,{children:x("myPage.cryoStorage.donorsOverview.subscription.startDate")})}),(0,n.jsx)(h.Z,{tagStyle:"bodyMediumBlogBold",children:eW})]})]}),(0,n.jsxs)("div",{className:W().termsAndConditionsWrapper,children:[(0,n.jsx)(w.Z,{checked:q,onChange:()=>X(!q),topAlign:!0}),(0,n.jsx)(h.Z,{className:W().termsAndConditionsText,tag:"p",children:(e=>{let t=(0,j.ZP)(e,{transform:(e,t)=>{var a,o,r,i;return"tag"===e.type&&"span"===e.name&&e.attribs&&"pregnancyTerms"===e.attribs.id?(0,n.jsx)("span",{className:W().termsHighlightedText,onClick:()=>{eu(!0)},children:null===(a=e.children)||void 0===a?void 0:a.map(e=>e.data)},t):"tag"===e.type&&"span"===e.name&&e.attribs&&"termsAndConditions"===e.attribs.id?(0,n.jsx)("span",{className:W().termsHighlightedText,onClick:()=>{es(!0)},children:null===(o=e.children)||void 0===o?void 0:o.map(e=>e.data)},t):"tag"===e.type&&"span"===e.name&&e.attribs&&"privacyPolicy"===e.attribs.id?(0,n.jsx)("span",{className:W().termsHighlightedText,onClick:()=>{e_(!0)},children:null===(r=e.children)||void 0===r?void 0:r.map(e=>e.data)},t):"tag"===e.type&&"span"===e.name&&e.attribs&&"storageSubscription"===e.attribs.id?(0,n.jsx)("span",{className:W().termsHighlightedText,onClick:()=>{ec(!0)},children:null===(i=e.children)||void 0===i?void 0:i.map(e=>e.data)},t):void 0}});return t})(eY)})]})]}),(0,n.jsx)("div",{className:W().confirmPlanButtonWrapper,children:(0,n.jsx)(p.Z,{className:W().confirmPlanButton,disabled:!q,isLoading:!q||l&&(eD||eA||eC||eN||ep),onClick:()=>{ej({onlyDonorProducts:!1}),v||l||et(!0),v&&!l&&en(!0),l&&handleSetSubscription()},text:x("myPage.cryoStorage.donorsOverview.subscription.confirmPlanChange")})}),(0,n.jsx)(s.Z,{isOpen:ei,onClose:()=>es(!1),position:"right",children:(0,n.jsx)(E.Z,{content:eR("TERMS_AND_CONDITIONS_OF_PURCHASE"),onClose:es})}),(0,n.jsx)(s.Z,{isOpen:ed,onClose:()=>eu(!1),position:"right",children:(0,n.jsx)(E.Z,{content:eR("PREGNANCY_SLOT_AGREEMENT"),onClose:eu})}),(0,n.jsx)(s.Z,{isOpen:el,onClose:()=>ec(!1),position:"right",children:(0,n.jsx)(E.Z,{content:eR("TERMS_AND_CONDITIONS_FOR_STORAGE_OF_DONOR_SPERM"),onClose:ec})}),(0,n.jsx)(s.Z,{isOpen:em,onClose:()=>e_(!1),position:"right",children:(0,n.jsx)(E.Z,{content:eR("PRIVACY_POLICY"),onClose:es})})]}):"success"===J?(0,n.jsx)(r.Fragment,{children:(0,n.jsxs)("div",{className:W().successScreen,children:[(null==a?void 0:a.planChangeRegisteredText)&&(0,n.jsx)(g.Z,{text:a.planChangeRegisteredText}),(0,n.jsxs)("div",{className:W().planOverview,children:[(0,n.jsxs)("div",{className:W().plan,children:[(0,n.jsxs)("div",{className:W().header,children:[(0,n.jsx)(h.Z,{children:x("myPage.cryoStorage.donorsOverview.subscription.plan")}),(0,n.jsx)(h.Z,{tagStyle:"caption",children:"".concat(null==Q?void 0:Q.extension_attributes.price.currency_code," ").concat(Y(null==Q?void 0:Q.extension_attributes.price.price_including_tax))})]}),(0,n.jsx)(h.Z,{tagStyle:"bodyMediumBlogBold",children:x("cryoStorage.storageShortName_".concat(null==Q?void 0:Q.sku))}),(0,n.jsx)(h.Z,{className:W().label,tagStyle:"bodySmall",children:getStorageItemLabel(Q)})]}),(0,n.jsxs)("div",{className:W().plan,children:[(0,n.jsx)("div",{className:W().header,children:(0,n.jsx)(h.Z,{children:x("myPage.cryoStorage.donorsOverview.subscription.startDate")})}),(0,n.jsx)(h.Z,{tagStyle:"bodyMediumBlogBold",children:eW})]})]})]})}):void 0]})};UserCryoStorageSubscriptionOverlayChangePlan.displayName="UserCryoStorageSubscriptionOverlayChangePlan";var Q=a(12524),F=a.n(Q),G=a(12031),V=a(33421);let useMutationUpdatePaymentMethod=e=>{let t=(0,y.useQueryClient)(),a=(0,y.useMutation)(async t=>{let a=await v.Z.fetch("en/rest/en/V2/subscription/update-payment",{body:JSON.stringify(t),headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"POST"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationUpdatePaymentMethod",e),e});return a},{onError:async e=>e,onSuccess:async()=>{t.invalidateQueries([b.MJ.CART])}});return a};var J=a(20152),z=a.n(J);let UserCryoStorageSubscriptionOverlayIntro=e=>{var t,a;let{cryoStorageManageSubscription:s,isSubscriptionSuspended:l=!1,onCancelSubscription:d,onChangeSubscription:u,refetchMyStorage:m,storageExpiryDate:p,subscription:g}=e,{t:y}=(0,o.QT)(),{data:v}=(0,_.useSession)(),x=null==v?void 0:null===(t=v.user)||void 0===t?void 0:t.bearer_token,[b,C]=(0,r.useState)(null),[S,N]=(0,r.useState)(null),j=(0,r.useRef)(null),{data:f,isLoading:w}=(0,L.Q)({subscriptionId:null!=b?b:void 0,token:x},!!(x&&b)),{mutate:T}=useMutationUpdatePaymentMethod(x),E=(0,r.useMemo)(()=>l?g.plans.find(e=>"Suspended"===e.status):g.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED")?g.plans.find(e=>"Active"===e.status&&e.is_future):g.plans.find(e=>"Active"===e.status&&!e.is_future),[l,g]),P=(0,r.useMemo)(()=>
1{if(g.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED"))return g.plans.find(e=>"Active"===e.status&&!e.is_future)},[g]),Z=(0,r.useMemo)(()=>{var e,t,a,n;if(!(null==E?void 0:E.payment_method))return;let o="**** ".concat(null===(t=E.payment_method)||void 0===t?void 0:null===(e=t.masked_card)||void 0===e?void 0:e.slice(-4)),r=null===(n=E.payment_method)||void 0===n?void 0:null===(a=n.expirary)||void 0===a?void 0:a.replace("-","/");return"".concat(o,", ").concat(r)},[E]),handleUpdatePaymentMethod=async()=>{var e,t,a,n;let o=null===(e=g.plans.find(e=>"Active"===e.status&&!e.is_future))||void 0===e?void 0:e.subscription_id,r=g.reason_code_cancel_disallow.includes("PAYMENT_FAILED"),i=g.plans.some(e=>"Suspended"===e.status),s=g.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED");i&&(o=null===(t=g.plans.find(e=>"Suspended"===e.status))||void 0===t?void 0:t.subscription_id),r&&!i&&(o=null===(a=g.plans.find(e=>"Active"===e.status&&!e.is_future))||void 0===a?void 0:a.subscription_id),s&&(o=null===(n=g.plans.find(e=>"Active"===e.status&&e.is_future))||void 0===n?void 0:n.subscription_id),o&&C(o)},destroyReepayInstance=()=>{try{var e;null===(e=j.current)||void 0===e||e.destroy()}finally{j.current=null}};(0,r.useEffect)(()=>{!j.current&&window.Reepay&&(j.current=new window.Reepay.ModalCheckout)},[]),(0,r.useEffect)(()=>{if(!f||!b)return;let e=j.current;e&&window.Reepay&&S!==f.session_id&&(e.show(f.session_id,{showReceipt:!1}),N(f.session_id),e.addEventHandler(window.Reepay.Event.Accept,e=>{T({id:e.id,payment_method:e.payment_method},{onSuccess:()=>{destroyReepayInstance(),C(null),N(null),null==m||m(),window.location.reload()}})}),e.addEventHandler(window.Reepay.Event.Cancel,()=>{C(null),N(null)}))},[f,m,w,T,b,S]);let M=(0,r.useMemo)(()=>{var e;switch(null==E?void 0:null===(e=E.payment_method)||void 0===e?void 0:e.type){case"visa":case"visa_dk":case"visa_elec":return"Visa";case"mc":return"Mastercard";case"dankort":return"Dankort";case"maestro":return"Maestro";case"ideal":return"IDeal";case"mobilepay":return"MobilePay";case"klarnapaynow":case"klarnapaylater":case"klarnasliceit":case"klarnadirectbanktransfer":case"klarnadirectdebit":return"Klarna";case"googlepay":return"GooglePay";case"applepay":return"ApplePay"}},[null==E?void 0:null===(a=E.payment_method)||void 0===a?void 0:a.type]);return(0,n.jsxs)("div",{className:z().component,children:[(0,n.jsx)(h.Z,{className:z().headline,tagStyle:"headlineSmall",children:y("myPage.cryoStorage.donorsOverview.subscription.manageSubscription")}),(0,n.jsxs)("div",{className:z().optionsWrapper,children:[(0,n.jsxs)("div",{className:z().option,children:[(0,n.jsxs)("div",{className:z().optionTitle,children:[(0,n.jsx)(h.Z,{children:y("myPage.cryoStorage.donorsOverview.subscription.paymentMethod")}),(0,n.jsxs)("div",{className:z().card,children:[M&&(0,n.jsx)(G.Z,{name:M}),(0,n.jsx)(h.Z,{tagStyle:"bodyMediumBlogBold",children:Z})]})]}),(0,n.jsxs)("button",{className:z().optionButton,onClick:handleUpdatePaymentMethod,children:[(0,n.jsx)(h.Z,{className:z().buttonText,children:y("myPage.cryoStorage.donorsOverview.subscription.update")}),(0,n.jsx)(i.Z,{className:z().icon,name:"ChevronRight"})]}),(null==s?void 0:s.lastPaymentFailedErrorText)&&g.reason_code_cancel_disallow.includes("PAYMENT_FAILED")&&(0,n.jsx)(V.Z,{className:z().alertBar,color:"red",hasBorder:!0,items:[{icon:"Warning",text:s.lastPaymentFailedErrorText}]})]}),(0,n.jsxs)("button",{className:F()(z().option,{[z().isDisabled]:g.reason_code_change_disallow.includes("PAYMENT_FAILED")}),onClick:()=>{g.reason_code_cancel_disallow.includes("ACTIVE_PLAN_ALREADY_CANCELLED")?d():u()},children:[(0,n.jsxs)("div",{className:z().optionTitle,children:[(0,n.jsx)(h.Z,{children:y("myPage.cryoStorage.donorsOverview.subscription.plan")}),(0,n.jsx)(h.Z,{tagStyle:"bodyMediumBlogBold",children:y(g.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED")?"cryoStorage.storageShortName_".concat(null==P?void 0:P.product_sku):"cryoStorage.storageShortName_".concat(null==E?void 0:E.product_sku))})]}),(0,n.jsxs)("div",{className:z().changePlan,children:[(0,n.jsx)(h.Z,{className:z().buttonText,children:y("myPage.cryoStorage.donorsOverview.subscription.changePlan")}),(0,n.jsx)(i.Z,{className:z().icon,name:"ChevronRight"})]}),(null==s?void 0:s.planChangesNotAvailableWhenPaymentFailedErrorText)&&g.reason_code_change_disallow.includes("PAYMENT_FAILED")&&!g.is_plan_changeable&&(0,n.jsx)(V.Z,{className:z().alertBar,color:"red",hasBorder:!0,items:[{icon:"Warning",text:s.planChangesNotAvailableWhenPaymentFailedErrorText}]})]}),(0,n.jsx)("div",{className:z().option,children:(0,n.jsxs)("div",{className:z().optionTitle,children:[(0,n.jsx)(h.Z,{children:y("myPage.cryoStorage.donorsOverview.subscription.nextPayment")}),(0,n.jsx)(h.Z,{tagStyle:"bodyMediumBlogBold",children:c()(p).format("DD/MM/YYYY")})]})})]}),(0,n.jsxs)("button",{className:z().cancelSubscriptionButton,onClick:d,children:[(0,n.jsx)(i.Z,{className:z().icon,name:"Delete"}),(0,n.jsx)(h.Z,{children:y("myPage.cryoStorage.donorsOverview.subscription.cancelSubscription")})]})]})};UserCryoStorageSubscriptionOverlayIntro.displayName="UserCryoStorageSubscriptionOverlayIntro";var q=a(40763),X=a.n(q);let UserCryoStorageDonorSubscriptionOverlay=e=>{let{cryoStorageManageSubscription:t,isOpen:a=!1,isStorageExpired:l=!1,isSubscriptionSuspended:c=!1,onClose:d,refetchMyStorage:u,storageExpiryDate:m,subscription:_}=e,{t:p}=(0,o.QT)(),[g,h]=(0,r.useState)("intro"),[y,v]=(0,r.useState)(!1),x=(0,r.useMemo)(()=>
1{if(!_)return!1;let e=_.plans.filter(e=>e.is_future);return 1===_.plans.length&&1===e.length&&_.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED")},[_]),handleClose=()=>{if(d(),y&&(null==u||u(),v(!1)),null==_?void 0:_.reason_code_cancel_disallow.includes("ACTIVE_PLAN_ALREADY_CANCELLED")){h("cancel");return}h((null==_?void 0:_.plans.length)&&!x?"intro":"change")};return(0,r.useEffect)(()=>{if(null==_?void 0:_.reason_code_change_disallow.includes("PAYMENT_FAILED")){h("intro");return}(null==_?void 0:_.reason_code_cancel_disallow.includes("ACTIVE_PLAN_ALREADY_CANCELLED"))&&h("cancel"),_&&_.plans.length&&!x||h("change")},[x,l,_]),(0,n.jsx)(s.Z,{className:X().component,containerClassName:X().overlayContainer,disableFocusLock:"intro"===g||"change"===g,isOpen:a,onClose:handleClose,position:"right",children:(0,n.jsxs)("div",{className:X().contentWrapper,children:[(0,n.jsx)("button",{"aria-label":p("accessibility.ariaLabels.closeOverlay"),className:X().closeButton,onClick:handleClose,children:(0,n.jsx)(i.Z,{name:"Close"})}),(0,n.jsx)("div",{className:X().content,children:"intro"===g&&_?(0,n.jsx)(UserCryoStorageSubscriptionOverlayIntro,{cryoStorageManageSubscription:t,isSubscriptionSuspended:c,onCancelSubscription:()=>h("cancel"),onChangeSubscription:()=>h("change"),refetchMyStorage:u,storageExpiryDate:m,subscription:_}):"change"===g?(0,n.jsx)(UserCryoStorageSubscriptionOverlayChangePlan,{cryoStorageManageSubscription:t,isStorageExpired:l,onBackButtonClick:()=>h("intro"),onPlanChangeSuccess:()=>v(!0),storageExpiryDate:m,subscription:_}):"cancel"===g&&_?(0,n.jsx)(UserCryoStorageSubscriptionOverlayCancel,{cryoStorageCancelSubscription:null==t?void 0:t.cancelSubscription,onBackButtonClick:()=>h("intro"),subscription:_}):void 0})]})})};UserCryoStorageDonorSubscriptionOverlay.displayName="UserCryoStorageDonorSubscriptionOverlay";var K=UserCryoStorageDonorSubscriptionOverlay},16051:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return K}});var n=a(52322),o=a(5632),r=a(23848),i=a(50639),s=a(2784),l=a(76456),c=a(17289),d=a(28624),u=a(24450),m=a(28184),_=a(47343),p=a(47482),g=a(12524),h=a.n(g),y=a(28879),v=a.n(y),x=a(62202),b=a(3212),C=a(35936),S=a(93752),N=a(2475),j=a(61047),f=a(67723),w=a(34733),T=a(31871),E=a(71743),P=a(89785),Z=a(98929),M=a(50087),D=a(75306),O=a.n(D),A=a(76251),k=a(32445),R=a(14235),I=a(78167),L=a(19516),B=a(64435),H=a(39140),U=a(30075),Y=a(49322),W=a(5578),Q=a.n(W);let DonorsOverViewLarge=e=>{let{activeEmptyStorageContent:t,customerCountryTreatmentCode:a,dataCollections:o,extendStorage:r=!1,handleCounterValueChange:l,isEmptyActiveStorage:u=!1,isLimited:m=!1,isLoading:_=!1,isPaymentFailed:p=!1,isShipButtonDisabled:g,onClickShipButton:y,onClickStorageButton:v,onClose:x,onQueryReset:b,openExtend:S,toShipDonors:N,translatedCountries:j}=e,{t:f}=(0,i.QT)(),[w,P]=(0,s.useState)(!1),Z=!!N.length,{setActiveButton:M}=(0,C.lO)(),toolTipNotAvailableHTML=()=>(0,n.jsx)(c.Z,{tag:"p",children:(0,n.jsx)("span",{children:f("myPage.cryostorage.toolTips.notAvailable")})}),D=(0,s.useMemo)(()=>null==o?void 0:o.storage_items.sort((e,t)=>e.mot-t.mot).sort((e,t)=>t.type>e.type?1:-1),[o]);return(0,n.jsxs)("div",{className:h()(Q().component,{[Q().isEmptyActiveStorage]:u}),children:[(0,n.jsxs)("table",{className:h()(Q().table,{[Q().tableDisabled]:r}),children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:Q().tableHeader,children:(0,n.jsx)(c.Z,{children:f("myPage.cryostorage.donorsOverview.tableHeader.donor")})}),(0,n.jsx)("th",{className:Q().tableHeader,children:(0,n.jsx)(c.Z,{children:f("myPage.cryostorage.donorsOverview.tableHeader.treatmentCountry")})}),(0,n.jsx)("th",{className:Q().tableHeader,children:(0,n.jsx)(c.Z,{children:f("myPage.cryostorage.donorsOverview.tableHeader.type")})}),(0,n.jsx)("th",{className:Q().tableHeader,children:(0,n.jsx)(c.Z,{children:f("myPage.cryostorage.donorsOverview.tableHeader.quantity")})}),(0,n.jsx)("th",{className:Q().tableHeader,children:(0,n.jsx)(c.Z,{children:f("myPage.cryostorage.donorsOverview.tableHeader.shipQuantity")})})]})}),(0,n.jsx)("tbody",{children:null==D?void 0:D.map((e,t)=>{let o=N.find(t=>
1t.donor_id===e.donor_id&&t.treatment_country===e.treatment_country&&t.mot===e.mot&&t.type===e.type),r=(0,T.ep)(e.treatment_country,j);return(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:Q().tableData,children:(0,n.jsxs)("div",{className:Q().donorColumn,children:[(0,n.jsx)("div",{className:Q().donorImage,children:(0,n.jsx)(I.Z,{alt:"",className:h()({[Q().donorImageBlur]:m}),src:"".concat((0,U.e)((0,T.aM)(e.donor_image),{height:768,width:768},"magento")),srcSet:[{media:"(max-width: 375px)",url:"".concat((0,U.e)((0,T.aM)(e.donor_image),{height:375,width:375},"magento"))},{media:"(max-width: 768px)",url:"".concat((0,U.e)((0,T.aM)(e.donor_image),{height:768,width:768},"magento"))}],unoptimized:!0})}),(0,n.jsx)(c.Z,{className:Q().donorName,tagStyle:"bodyMediumBold",children:e.donor_alias})]})}),(0,n.jsx)("td",{className:Q().tableData,children:(0,n.jsx)(c.Z,{children:null==r?void 0:r.esb_translated_name})}),(0,n.jsx)("td",{className:Q().tableData,children:(0,n.jsx)(c.Z,{children:"".concat((0,Y.Y)(f)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].label," (").concat((0,Y.Y)(f)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].type,")")})}),(0,n.jsx)("td",{className:Q().tableData,children:(0,n.jsx)(c.Z,{children:e.net_qty})}),(0,n.jsx)("td",{className:Q().tableData,children:"CAN_SHIP"!==e.item_status?(0,n.jsx)("div",{className:Q().toolTipContainer,children:(0,n.jsx)(B.Z,{content:toolTipNotAvailableHTML()})}):(0,n.jsx)("div",{className:Q().counterContainer,children:(0,n.jsx)(L.Z,{disabled:a!==e.treatment_country&&Z,max:e.net_qty,onChange:l(e.treatment_country,e),value:null==o?void 0:o.strawQty,variant:"medium"},"".concat(JSON.stringify(o)))})})]},t)})})]}),u&&t&&(0,n.jsx)("div",{className:Q().emptyStorageContent,children:(0,n.jsx)(d.Z,{buttons:t.buttons,content:t.content,headline:t.headline,image:t.image})}),(0,n.jsxs)("div",{className:Q().buttonContainer,children:[E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?p?(0,n.jsx)(R.Z,{className:Q().button,onClick:v,text:f("myPage.cryoStorage.donorsOverview.subscription.updatePaymentDetails"),variant:"tertiary"}):r&&(0,n.jsx)(R.Z,{className:Q().button,onClick:v,text:f("myPage.cryostorage.donorsOverview.extendStorageButtonLabel"),variant:"tertiary"}):r&&(0,n.jsx)(R.Z,{className:Q().button,onClick:()=>{P(!0)},text:f("myPage.cryostorage.donorsOverview.extendStorageButtonLabel"),variant:"tertiary"}),!u&&(0,n.jsx)(R.Z,{className:Q().button,disabled:g,isLoading:_,onClick:y,text:f("myPage.cryostorage.donorsOverview.shipButtonLabel"),variant:"tertiary"})]}),!E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT&&(0,n.jsx)(H.Z,{isOpen:w||S,onClose:()=>{P(!1),x()},onComplete:()=>{M("cart")},onQueryReset:b})]})};DonorsOverViewLarge.displayName="DonorsOverViewLarge";var F=a(20264),G=a.n(F);let DonorsOverViewSmall=e=>{let{activeEmptyStorageContent:t,customerCountryTreatmentCode:a,dataCollections:o,extendStorage:r=!1,isEmptyActiveStorage:l=!1,isLimited:u=!1,isLoading:m=!1,isPaymentFailed:_=!1,isShipButtonDisabled:p,onClickShipButton:g,onClickStorageButton:y,onClose:v,onCounterValueChange:x,onQueryReset:b,openExtend:C,toShipDonors:S,translatedCountries:N}=e,{t:j}=(0,i.QT)(),[f,w]=(0,s.useState)(!1),[P,Z]=(0,s.useState)([]),M=!!S.length,toolTipNotAvailableHTML=()=>(0,n.jsx)(c.Z,{tag:"p",tagStyle:"bodyMedium",children:(0,n.jsx)("span",{children:j("myPage.cryostorage.toolTips.notAvailable")})}),D=(0,s.useMemo)(()=>null==o?void 0:o.storage_items.sort((e,t)=>e.mot-t.mot).sort((e,t)=>t.type>e.type?1:-1),[o]);return(0,s.useEffect)(()=>{let e=null==D?void 0:D.reduce((e,t)=>{let a=e.find(e=>e.donorId===t.donor_id&&e.treatmentCountry===t.treatment_country),n={donor_alias:t.donor_alias,donor_id:t.donor_id,donor_image:t.donor_image,ejaculate_id:t.ejaculate_id,item_status:t.item_status,mot:t.mot,net_qty:t.net_qty,purchase_type:t.purchase_type,treatment_country:t.treatment_country,type:t.type};if(a)a.items=a.items||[],a.items.push(n);else{var o,r,i;let a={donorAlias:t.donor_alias,donorId:t.donor_id,donorImage:null!==(r=t.donor_image)&&void 0!==r?r:"/images/esb_48x48.png",items:[n],treatmentCountry:null!==(i=null===(o=(0,T.ep)(t.treatment_c
1ountry,N))||void 0===o?void 0:o.esb_translated_name)&&void 0!==i?i:""};e.push(a)}return e},[]);Z(e)},[]),(0,n.jsxs)("div",{className:G().component,children:[null==P?void 0:P.map((e,t)=>{var o;return(0,n.jsx)(s.Fragment,{children:(0,n.jsxs)("div",{className:h()(G().storageWrapper,{[G().tableDisabled]:r}),children:[(0,n.jsxs)("div",{className:G().headLineContainer,children:[(0,n.jsx)("div",{className:G().imageBlock,children:(0,n.jsx)(I.Z,{alt:"",className:h()({[G().donorImageBlur]:u}),src:"".concat((0,U.e)((0,T.aM)(e.donorImage),{height:768,width:768},"magento")),srcSet:[{media:"(max-width: 375px)",url:"".concat((0,U.e)((0,T.aM)(e.donorImage),{height:375,width:375},"magento"))},{media:"(max-width: 768px)",url:"".concat((0,U.e)((0,T.aM)(e.donorImage),{height:768,width:768},"magento"))}],unoptimized:!0})}),(0,n.jsxs)("div",{className:G().textBlock,children:[(0,n.jsx)(c.Z,{className:G().donorName,tagStyle:"bodyMediumBold",children:e.donorAlias}),(0,n.jsxs)(c.Z,{className:G().treatmentCountry,tagStyle:"bodySmall",children:[j("myPage.cryostorage.donorsOverview.tableHeader.treatmentCountry"),": ",e.treatmentCountry]})]})]}),(0,n.jsx)("hr",{className:G().divider}),(0,n.jsx)("div",{children:(0,n.jsxs)("table",{className:G().table,children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:G().tableHeader,children:(0,n.jsx)(c.Z,{tagStyle:"bodyMedium",children:j("myPage.cryostorage.donorsOverview.tableHeader.type")})}),(0,n.jsx)("th",{className:G().tableHeader,children:(0,n.jsx)(c.Z,{tagStyle:"bodyMedium",children:j("myPage.cryostorage.donorsOverview.tableHeader.quantity")})}),(0,n.jsx)("th",{className:G().tableHeader,children:(0,n.jsx)(c.Z,{tagStyle:"bodyMedium",children:j("myPage.cryostorage.donorsOverview.tableHeader.shipQuantity")})})]})}),(0,n.jsx)("tbody",{children:null===(o=e.items)||void 0===o?void 0:o.map((e,t)=>{let o=S.find(t=>t.donor_id===e.donor_id&&t.treatment_country===e.treatment_country&&t.mot===e.mot&&t.type===e.type);return(0,n.jsx)(s.Fragment,{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:G().tableData,children:(0,n.jsx)(c.Z,{tagStyle:"bodyMedium",children:"".concat((0,Y.Y)(j)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].label," (").concat((0,Y.Y)(j)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].type,")")})}),(0,n.jsx)("td",{className:G().tableData,children:(0,n.jsx)(c.Z,{tagStyle:"bodyMedium",children:e.net_qty})}),(0,n.jsx)("td",{className:G().tableData,children:"CAN_SHIP"!==e.item_status?(0,n.jsx)("div",{className:G().toolTipContainer,children:(0,n.jsx)(B.Z,{content:toolTipNotAvailableHTML(),triggerType:"Click"})}):(0,n.jsx)("div",{className:G().counterContainer,children:(0,n.jsx)(L.Z,{disabled:a!==e.treatment_country&&M,max:e.net_qty,onChange:x(e.treatment_country,e),value:null==o?void 0:o.strawQty,variant:"medium"},"".concat(JSON.stringify(o)))})})]})},t)})})]})})]})},t)}),l&&t&&(0,n.jsx)("div",{className:G().emptyStorageContent,children:(0,n.jsx)(d.Z,{buttons:t.buttons,content:t.content,headline:t.headline,image:t.image})}),(0,n.jsxs)("div",{className:G().buttonContainer,children:[E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?_?(0,n.jsx)(R.Z,{className:G().button,onClick:y,text:j("myPage.cryoStorage.donorsOverview.subscription.updatePaymentDetails"),variant:"tertiary"}):r&&(0,n.jsx)(R.Z,{className:G().button,onClick:y,text:j("myPage.cryostorage.donorsOverview.extendStorageButtonLabel"),variant:"tertiary"}):r&&(0,n.jsx)(R.Z,{className:G().button,onClick:()=>{w(!0)},text:j("myPage.cryostorage.donorsOverview.extendStorageButtonLabel"),variant:"tertiary"}),!l&&(0,n.jsx)(R.Z,{className:G().button,disabled:p,isLoading:m,onClick:g,text:j("myPage.cryostorage.donorsOverview.shipButtonLabel"),variant:"tertiary"})]}),!E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT&&(0,n.jsx)(H.Z,{isOpen:f||C,onClose:()=>{w(!1),v()},onQueryReset:b})]})};DonorsOverViewSmall.displayName="DonorsOverViewSmall";var V=a(63820),J=a(95681),z=a.n(J);let UserCryoStorageDonor=e=>{let{activeEmptyStorageContent:t,activeSubscription:a,cryoStorageManageSubscription:r,customerCountryTreatmentCode:l,dataCollections:d,expiryDate:_,hasExpiredStorage:p=!1,isEmptyActiveStorage:g=!1,isLimited:y=!1,isShipButtonDisabled:D=!1,isStorageExpired:R=!1,refetchMyStorage:I,token:L}
1=e,B=(0,o.useRouter)(),[H,U]=(0,s.useState)(!1),[Y,W]=(0,s.useState)(!1),[Q,F]=(0,s.useState)(!1),[G,J]=(0,s.useState)(!1),[q,X]=(0,s.useState)(!1),[K,$]=(0,s.useState)(),[ee,et]=(0,s.useState)([]),{t:ea}=(0,i.QT)(),en=(0,M.i)(parseInt(O().tablet)),{handleInvalidateQueries:eo,setStorageDonorItems:er}=(0,C.lO)(),{data:ei}=(0,j.B)(),{data:es}=(0,f.r)(L,!!ei,B.locale),{data:el}=(0,w.n)(B.locale),{isLoading:ec,isSuccess:ed,mutate:eu,reset:em}=(0,N.o)(L,B.locale),handleQueryReset=()=>{eo([T.MJ.CART_ITEMS,T.MJ.DONOR_BY_NAME,T.MJ.DONOR_BY_NUMBER,T.MJ.STOCK,T.MJ.CART_TOTAL])};(0,s.useEffect)(()=>{ed&&U(!0)},[ed]);let handleClose=()=>{J(!1)},e_=(0,s.useMemo)(()=>(null==a?void 0:a.reason_code_cancel_disallow.includes("SUSPENDED"))||(null==a?void 0:a.reason_code_change_disallow.includes("SUSPENDED")),[a]),ep=(0,s.useMemo)(()=>(null==a?void 0:a.reason_code_cancel_disallow.includes("PAYMENT_FAILED"))||(null==a?void 0:a.reason_code_change_disallow.includes("PAYMENT_FAILED")),[a]),eg=(0,s.useCallback)(()=>{if(!ee.length){(0,x.ZP)(e=>(0,n.jsx)(b.Z,{id:e.id,message:ea("myPage.cryostorage.youNeedToChoose"),type:"general"}),{className:b.a.notificationsGeneral,duration:4e3,position:"bottom-left"});return}if(null==es?void 0:es.length){F(!0);return}B.push((0,Z.a)(B.locale,Z.g.CHECKOUT))},[es,ee]),eh=(0,s.useCallback)((e,t)=>a=>{a>0&&e!==l&&(W(!0),$(e));let n=!!ee.filter(e=>e.donor_id===t.donor_id&&e.ejaculate_id===t.ejaculate_id&&e.treatment_country===t.treatment_country&&e.mot===t.mot&&e.type===t.type).length;if(n){let e=ee.map(e=>e.donor_id===t.donor_id&&e.ejaculate_id===t.ejaculate_id&&e.treatment_country===t.treatment_country&&e.mot===t.mot&&e.type===t.type?{...t,strawQty:a}:e);et(e)}else et([...ee,{...t,strawQty:a}])},[ee,l]),handleOpenExtendOverlay=()=>J(!0),ey=(0,s.useMemo)(()=>{if(K)return(0,T.ep)(K,el)},[el,K]),ev=(0,s.useMemo)(()=>_?(0,P.x)(_,B.locale):"",[_]);(0,s.useEffect)(()=>{let e=ee.find(e=>0===e.strawQty);e&&et(ee.filter(e=>0!==e.strawQty))},[ee]);let ex=(0,s.useMemo)(()=>{let e=v()(_).format("DD/MM/YYYY");return a&&a.plans.length?(null==a?void 0:a.reason_code_cancel_disallow.includes("PAYMENT_FAILED"))||(null==a?void 0:a.reason_code_change_disallow.includes("PAYMENT_FAILED"))||(null==a?void 0:a.reason_code_cancel_disallow.includes("PLAN_CHANGE_REQUESTED"))||(null==a?void 0:a.reason_code_change_disallow.includes("PLAN_CHANGE_REQUESTED"))?"".concat(ea("myPage.cryoStorage.donorsOverview.subscription.nextPayment"),": ").concat(e):a.reason_code_cancel_disallow.includes("ACTIVE_PLAN_ALREADY_CANCELLED")?"".concat(ea("myPage.cryoStorage.donorsOverview.subscription.cancelledAsOf"),": ").concat(e):"".concat(ea("myPage.cryoStorage.donorsOverview.subscription.nextPayment"),": ").concat(e):p?"".concat(ea("myPage.cryostorage.donorsOverview.expiredLabel")," ").concat(e):"".concat(ea("myPage.cryostorage.donorsOverview.expiresLabel")," ").concat(e)},[a,_,p]);return(0,s.useEffect)(()=>{(null==es||!es.length)&&ee.length&&er(ee)},[es,ee]),(0,s.useEffect)(()=>{p&&(0,x.ZP)(e=>(0,n.jsx)(b.Z,{id:e.id,type:"warning",children:(0,n.jsx)(S.Z,{elements:[(0,n.jsx)(c.Z,{className:z().textLink,onClick:handleOpenExtendOverlay,tagStyle:"linkMedium",children:ea("myPage.cryostorage.donorsOverview.extendLabel")},ea("myPage.cryostorage.donorsOverview.extendLabel"))],text:"".concat(ea("myPage.cryostorage.donorsOverview.extendDescription")," %link%"),wordKeys:["%link%"]})}),{className:b.a.notificationsWarning,duration:4e3,position:"bottom-left"})},[p]),(0,s.useEffect)(()=>{!ec&&ed&&(em(),F(!1))},[ec,ed]),(0,n.jsxs)("div",{className:z().component,children:[(0,n.jsxs)(m.Z,{children:[(0,n.jsxs)(u.Z,{width:{laptop:6,tablet:7},children:[(0,n.jsx)(c.Z,{className:z().headline,tag:"h1",tagStyle:"headlineLarge",children:ea("myPage.cryostorage.donorsOverview.title")}),(0,n.jsx)(c.Z,{className:z().donorsOverviewText,tag:"p",children:ea("myPage.cryostorage.donorsOverview.text")})]}),H&&(0,n.jsx)("div",{"aria-atomic":"true",className:z().hidden,role:"status",children:ea("accessibility.statusMessages.cartCleared")}),E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?(0,n.jsx)(u.Z,{className:z().extendExpiresColumn,width:{laptop:6,tablet:5},children:(0,n.jsxs)("div",{className:z().expirationGroup,children:[(0,n.jsx)(c.Z,{className:h()(z().expirationLabel,{[z().isError]:p||e_||ep}),tag:"p",children:ex}),(0,n.jsx)("button",{className:z().extendLink,onClick:()=>X(!0),children:(0,n.jsx)(c.Z,{tagStyle:"bodyXSmall",children:a&&a.plans.length?ea("myPage.cryoStorage.donorsOverview.subscription.manageSubscription"):ea("myPage.cryostorage.donorsOverview.extendLabel")})})]})}):(0,n.jsx)(u.Z,{className:z().extendExpiresColumn,width:{laptop:6,tablet:5},children:(0,n.jsxs)("div",{className:z().expirationGroup,children:[(0,n.jsx)(c.Z,{className:h()(z().expirationLabel,{[z().isError]:p}),tag:"p",children:p?"".concat(ea("myPage.cryostorage.donorsOverview.expiredLabel")," ").
1concat(ev):"".concat(ea("myPage.cryostorage.donorsOverview.expiresLabel")," ").concat(ev)}),(0,n.jsx)("button",{className:z().extendLink,onClick:handleOpenExtendOverlay,children:(0,n.jsx)(c.Z,{tagStyle:"bodyXSmall",children:ea("myPage.cryostorage.donorsOverview.extendLabel")})})]})})]}),(0,n.jsx)(m.Z,{children:(0,n.jsx)(u.Z,{children:en?(0,n.jsx)(DonorsOverViewLarge,{activeEmptyStorageContent:t,customerCountryTreatmentCode:l,dataCollections:d,extendStorage:p,handleCounterValueChange:eh,isEmptyActiveStorage:g,isLimited:y,isPaymentFailed:(null==a?void 0:a.reason_code_cancel_disallow.includes("PAYMENT_FAILED"))||(null==a?void 0:a.reason_code_change_disallow.includes("PAYMENT_FAILED")),isShipButtonDisabled:D,onClickShipButton:eg,onClickStorageButton:E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?()=>X(!0):void 0,onClose:handleClose,onQueryReset:handleQueryReset,openExtend:G,toShipDonors:ee,translatedCountries:el}):(0,n.jsx)(DonorsOverViewSmall,{activeEmptyStorageContent:t,customerCountryTreatmentCode:l,dataCollections:d,extendStorage:p,isEmptyActiveStorage:g,isLimited:y,isPaymentFailed:(null==a?void 0:a.reason_code_cancel_disallow.includes("PAYMENT_FAILED"))||(null==a?void 0:a.reason_code_change_disallow.includes("PAYMENT_FAILED")),isShipButtonDisabled:D,onClickShipButton:eg,onClickStorageButton:E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?()=>X(!0):void 0,onClose:handleClose,onCounterValueChange:eh,onQueryReset:handleQueryReset,openExtend:G,toShipDonors:ee,translatedCountries:el})})}),(0,n.jsx)(k.Z,{cancelText:ea("myPage.cryostorage.emptyCart.buttonCancelText"),confirmText:ea("myPage.cryostorage.emptyCart.buttonProceedText"),headline:ea("myPage.cryostorage.emptyCart.headline"),isOpen:Q,onClose:()=>F(!1),onConfirm:()=>{eu({onlyDonorProducts:!1},{onSuccess:async()=>{B.push((0,Z.a)(B.locale,Z.g.CHECKOUT))}})},text:ea("myPage.cryostorage.emptyCart.text")}),E.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?(0,n.jsx)(V.Z,{cryoStorageManageSubscription:r,isOpen:q,isStorageExpired:R,isSubscriptionSuspended:e_,onClose:()=>X(!1),refetchMyStorage:I,storageExpiryDate:_,subscription:a}):null,(0,n.jsx)(A.Z,{donorCountryCode:K,donorTreatmentCountry:null==ey?void 0:ey.esb_translated_name,isOpen:Y,onClose:()=>W(!1),onQueryReset:()=>eo([T.MJ.CUSTOMER])})]})};UserCryoStorageDonor.displayName="UserCryoStorageDonor";var q=a(29352),X=a.n(q);let UserCryoStorage=e=>{var t;let{cryoStorageSettings:a}=e,{t:g}=(0,i.QT)(),{data:h}=(0,r.useSession)(),y=(0,o.useRouter)(),v=null==h?void 0:null===(t=h.user)||void 0===t?void 0:t.bearer_token,{data:x,isFetching:b,refetch:C}=(0,p.q)(v,y.locale),{data:S}=(0,_.t2)(v,y.locale),[N,j]=(0,s.useState)(null),[f,w]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{j(null==x?void 0:x.status)},[b]),(0,s.useEffect)(()=>{var e;if((null==x?void 0:null===(e=x.reason_code)||void 0===e?void 0:e.includes("STORAGE_EXPIRED"))&&N){w(!0);return}},[b,N]),(0,n.jsx)(s.Fragment,{children:b?(0,n.jsx)(l.Z,{}):(0,n.jsx)(m.Z,{className:X().component,children:(0,n.jsx)(u.Z,{offset:{laptop:1},width:{laptop:10},children:(e=>{var t,o,r;if(a){if("NO_STORAGE"===e)return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(c.Z,{className:X().headline,tag:"h1",tagStyle:"headlineLarge",children:g("myPage.cryostorage.title")}),(0,n.jsx)(d.Z,{buttons:a.withoutStorageState.buttons,content:a.withoutStorageState.content,headline:a.withoutStorageState.headline,image:a.withoutStorageState.image})]});if("SETTING_UP"===e)return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(c.Z,{className:X().headline,tag:"h1",tagStyle:"headlineLarge",children:g("myPage.cryostorage.title")}),(0,n.jsx)(d.Z,{buttons:a.withStorageState.buttons,content:a.withStorageState.content,headline:a.withStorageState.headline,image:a.withStorageState.image})]});if("EMPTY"===e&&S&&(null==x?void 0:x.is_subscription))return(0,n.jsx)(UserCryoStorageDonor,{activeEmptyStorageContent:a.activeEmptyStorageState,activeSubscription:x.subscription,cryoStorageManageSubscription:a.cryoStorageManageSubscription,customerCountryTreatmentCode:S.treatment_country_id,dataCollections:x,expiryDate:null!==(t=null==x?void 0:x.storage_expire_date)&&void 0!==t?t:"",isEmptyActiveStorage:!0,isLimited:(null==S?void 0:S.purchase_profile)===_.QA.byNumber,refetchMyStorage:C,token:v});if("EMPTY"===e&&!(null==x?void 0:x.is_subscription))return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(c.Z,{className:X().headline,tag:"h1",tagStyle:"headlineLarge",children:g("myPage.cryostorage.title")}),(0,n.jsx)(d.Z,{buttons:a.activeEmptyStorageState.buttons,content:a.activeEmptyStorageState.content,headline:a.activeEmptyStorageState.headline,image:a.activeEmptyStorageState.image})]});if("CAN_SHIP"===e&&S)return(0,n.jsx)(UserCryoStorageDonor,{activeSubscription:null==x?void 0:x.subscription,cryoStorageManageSubscription:a.cryoStorageManageSubscription,customerCountryTreatmentCode:S.treatment_c
1ountry_id,dataCollections:x,expiryDate:null!==(o=null==x?void 0:x.storage_expire_date)&&void 0!==o?o:"",isLimited:(null==S?void 0:S.purchase_profile)===_.QA.byNumber,refetchMyStorage:C,token:v});if("NOT_SHIPPABLE"===e&&S){if(!(null==x?void 0:x.storage_expire_date))return;return(0,n.jsx)(UserCryoStorageDonor,{activeSubscription:(null==x?void 0:x.is_subscription)?x.subscription:void 0,cryoStorageManageSubscription:a.cryoStorageManageSubscription,customerCountryTreatmentCode:S.treatment_country_id,dataCollections:x,expiryDate:null==x?void 0:x.storage_expire_date,hasExpiredStorage:f,isShipButtonDisabled:!!(f||x.subscription.reason_code_cancel_disallow.includes("PAYMENT_FAILED")||x.subscription.reason_code_change_disallow.includes("PAYMENT_FAILED")),isStorageExpired:null==x?void 0:null===(r=x.reason_code)||void 0===r?void 0:r.includes("STORAGE_EXPIRED"),refetchMyStorage:C,token:v})}}})(N)})})})};UserCryoStorage.displayName="UserCryoStorage";var K=UserCryoStorage},19180:function(e,t,a){"use strict";a.d(t,{xV:function(){return useUserDetailsContext}});var n=a(52322),o=a(2784);let r=(0,o.createContext)(void 0);function useUserDetailsContext(){let[e,t]=(0,o.useState)("UserHome"),a=(0,o.useContext)(r);return void 0===a?{activeComponent:e,setActiveComponent:t}:a}t.ZP=e=>{let{children:t,value:a}=e;return(0,n.jsx)(r.Provider,{value:a,children:t})}},97351:function(e,t,a){"use strict";var n=a(52322),o=a(5632),r=a(50639),i=a(14235),s=a(17289),l=a(67478),c=a(73051),d=a.n(c);let UserExpiredSessionModal=e=>{let{isOpen:t=!1}=e,{t:a}=(0,r.QT)(),c=(0,o.useRouter)();return(0,n.jsx)(l.Z,{className:d().component,isOpen:t,children:(0,n.jsxs)("div",{className:d().container,children:[(0,n.jsx)(s.Z,{tag:"label",tagStyle:"headlineXSmall",children:"".concat(a("session.expired"))}),(0,n.jsx)(i.Z,{className:d().continueButton,onClick:()=>{c.push("/"),sessionStorage.setItem("autoTriggerLogin","true")},text:"".concat(a("session.expiredLinkText")),variant:"tertiary"})]})})};UserExpiredSessionModal.displayName="UserExpiredSessionModal",t.Z=UserExpiredSessionModal},36155:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return el}});var n=a(52322),o=a(12524),r=a.n(o),i=a(5632),s=a(23848),l=a(50639),c=a(2784),d=a(62202),u=a(17289),m=a(16897),_=a(73090),p=a(3212),g=a(62916),h=a(28624),y=a(39140),v=a(24450),x=a(35936),b=a(28184),C=a(2475),S=a(61047),N=a(67723),j=a(47343),f=a(98067),w=a(47482),T=a(34733),E=a(31871),P=a(71743),Z=a(98929),M=a(50087),D=a(75306),O=a.n(D),A=a(76251),k=a(32445),R=a(63820),I=a(19180),L=a(50357),B=a(71194),H=a(1786),U=a(2074),Y=a.n(U);let ActionWidget=e=>{let{className:t,color:a,headline:o,icon:i,onClick:s,size:l="half",text:c}=e;return(0,n.jsxs)("div",{className:r()(Y().component,t,{[Y().isBlue]:"blue"===a,[Y().isGreen]:"green"===a,[Y().isOrange]:"orange"===a,[Y().isPurple]:"purple"===a,[Y().isFullWidth]:"full"===l}),onClick:s,children:[(0,n.jsx)("div",{className:Y().iconContainer,children:(0,n.jsx)(H.Z,{name:i})}),(0,n.jsxs)("div",{className:r()(Y().textContainer,{[Y().hasHeadline]:!!o}),children:[o&&(0,n.jsx)(u.Z,{tagStyle:"headlineSmall",variant:"medium",children:o}),(0,n.jsx)(u.Z,{tagStyle:"bodyMediumBold",children:c})]})]})};ActionWidget.displayName="ActionWidget";var W=a(14235),Q=a(78167),F=a(27858),G=a(10416),V=a(30075),J=a(73445),z=a.n(J);let GuidanceCard=e=>{let{buttons:t,className:a,color:o,image:i,title:s,onClickIcon:d,text:m,visual:_}=e,{t:p}=(0,l.QT)(),[g,h]=(0,c.useState)(!1);return(0,n.jsxs)("div",{className:r()(z().component,a,{[z().isPrimary]:"blue"===o,[z().isSecondary]:"yellow"===o,[z().isTertiary]:"green"===o,[z().isHidden]:g}),children:[(0,n.jsxs)("div",{className:z().cardHeader,children:[_&&(0,n.jsx)(F.Z,{className:z().visual,name:_}),i&&(0,n.jsx)("div",{className:z().imageContainer,children:(0,n.jsx)(Q.Z,{alt:i.altText||"",className:z().image,src:(0,V.e)(i.url,{height:375,width:375},"umbraco"),srcSet:[{media:"(max-width: 768px)",url:(0,V.e)(i.url,{height:375,width:375},"umbraco")}],unoptimized:!0})}),(0,n.jsx)("button",{"aria-label":p("accessibility.ariaLabels.hideCard"),className:z().iconCloseContainer,onClick:()=>{d?d():h(!0)},children:(0,n.jsx)(H.Z,{name:"Close"})})]}),(0,n.jsxs)("div",{className:z().cardBody,children:[(0,n.jsx)(u.Z,{tagStyle:"bodyLargeBold",text:s}),(0,n.jsx)(u.Z,{className:z().cardText,tag:"p",text:m})]}),t&&1===t.length&&(0,n.jsx)(W.Z,{text:t[0].text,url:t[0].url,variant:"quaternary"}),t&&t.length>1&&(0,n.jsx)(G.Z,{items:t.map(e=>({className:z().cardButton,...e,variant:"quaternary"}))})]})};
1GuidanceCard.displayName="GuidanceCard";var q=a(79207),X=a(87061),K=a.n(X);let StorageCard=e=>{let{buttons:t,headline:a,image:o,text:r}=e;return(0,n.jsx)("div",{className:K().component,children:(0,n.jsxs)(b.Z,{className:K().row,children:[(0,n.jsx)(v.Z,{className:K().leftColumn,width:{tablet:6},children:o&&(0,n.jsx)("div",{className:K().imageWrapper,children:(0,n.jsx)(Q.Z,{alt:o.altText||"",className:K().image,src:(0,V.e)(o.url,{height:768,width:768},"umbraco"),srcSet:[{media:"(max-width: 1024px)",url:(0,V.e)(o.url,{height:375,width:375},"umbraco")}],unoptimized:!0})})}),(0,n.jsxs)(v.Z,{className:K().rightColumn,width:{laptop:4,tablet:6},children:[a&&(0,n.jsx)(u.Z,{tagStyle:"headlineXSmall",text:a}),r&&(0,n.jsx)(q.Z,{className:K().richText,text:r}),t&&(0,n.jsx)(G.Z,{items:t.map(e=>({className:K().button,variant:"tertiary",...e}))})]})]})})};StorageCard.displayName="StorageCard";var $=a(19516),ee=a(64435),et=a(49322),ea=a(16529),en=a.n(ea);let StorageCardLarge=e=>{let{customerCountryTreatmentCode:t,isPaymentFailed:a=!1,isShipButtonDisabled:o,isStorageExpired:s=!1,items:c,onClickStorageButton:d,toShipDonors:m,onShipButtonClick:_,onCounterValueChange:p}=e,{t:g}=(0,l.QT)(),h=(0,i.useRouter)(),{data:y}=(0,T.n)(h.locale),toolTipNotAvailableHTML=()=>(0,n.jsx)(u.Z,{tag:"p",children:(0,n.jsx)("span",{children:g("myPage.cryostorage.toolTips.notAvailable")})});return(0,n.jsxs)("div",{className:r()(en().component,{[en().isDisabled]:o}),children:[(0,n.jsxs)("table",{className:en().table,children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:en().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:g("myPage.cryostorage.donorsOverview.tableHeader.donor")})}),(0,n.jsx)("th",{className:en().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:g("myPage.cryostorage.donorsOverview.tableHeader.treatmentCountry")})}),(0,n.jsx)("th",{className:en().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:g("myPage.cryostorage.donorsOverview.tableHeader.type")})}),(0,n.jsx)("th",{className:en().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:g("myPage.cryostorage.donorsOverview.tableHeader.quantity")})}),(0,n.jsx)("th",{className:en().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:g("myPage.cryostorage.donorsOverview.tableHeader.shipQuantity")})})]})}),(0,n.jsx)("tbody",{children:c.map((e,a)=>{var o,i;let s=m.find(t=>t.donor_id===e.donor_id&&t.treatment_country===e.treatment_country&&t.mot===e.mot&&t.type===e.type);return(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:en().tableData,children:(0,n.jsxs)("div",{className:en().donorColumn,children:[(0,n.jsx)("div",{className:en().imageWrapper,children:(0,n.jsx)(Q.Z,{alt:e.donor_alias,className:r()({[en().donorImageBlur]:e.isLimited}),src:"".concat((0,V.e)((0,E.aM)(e.donor_image),{height:768,width:768},"magento")),srcSet:[{media:"(max-width: 375px)",url:"".concat((0,V.e)((0,E.aM)(e.donor_image),{height:375,width:375},"magento"))},{media:"(max-width: 768px)",url:"".concat((0,V.e)((0,E.aM)(e.donor_image),{height:768,width:768},"magento"))}],unoptimized:!0})}),(0,n.jsx)(u.Z,{tagStyle:"bodyMediumBold",children:e.donor_alias})]})}),(0,n.jsx)("td",{className:en().tableData,children:(0,n.jsx)(u.Z,{children:null===(o=(0,E.ep)(null!==(i=e.treatment_country)&&void 0!==i?i:"",y))||void 0===o?void 0:o.esb_translated_name})}),(0,n.jsx)("td",{className:en().tableData,children:(0,n.jsx)(u.Z,{children:"".concat((0,et.Y)(g)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].label," (").concat((0,et.Y)(g)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].type,")")})}),(0,n.jsx)("td",{className:en().tableData,children:(0,n.jsx)(u.Z,{children:e.net_qty})}),(0,n.jsx)("td",{className:en().tableData,children:"CAN_SHIP"!==e.item_status?(0,n.jsx)("div",{className:en().toolTipContainer,children:(0,n.jsx)(ee.Z,{content:toolTipNotAvailableHTML(),triggerType:"Click"})}):(0,n.jsx)("div",{className:en().counterContainer,children:(0,n.jsx)($.Z,{disabled:t!==e.treatment_country&&!!m.length,max:e.net_qty,onChange:p(e.treatment_c
1ountry,e),value:null==s?void 0:s.strawQty,variant:"medium"},"".concat(JSON.stringify(s)))})})]},a)})})]}),(0,n.jsxs)("div",{className:en().buttonContainer,children:[a?(0,n.jsx)(W.Z,{className:en().button,onClick:d,text:g("myPage.cryoStorage.donorsOverview.subscription.updatePaymentDetails"),variant:"tertiary"}):s&&(0,n.jsx)(W.Z,{className:en().button,onClick:d,text:g("myPage.cryostorage.donorsOverview.extendStorageButtonLabel"),variant:"tertiary"}),(0,n.jsx)(W.Z,{className:en().button,disabled:o,onClick:_,text:g("myPage.cryostorage.donorsOverview.shipButtonLabel"),variant:"tertiary"})]})]})};StorageCardLarge.displayName="StorageCardLarge";var eo=a(49937),er=a.n(eo);let StorageCardSmall=e=>{let{customerCountryTreatmentCode:t,donorName:a,image:o,isPaymentFailed:s=!1,isShipButtonDisabled:d,isStorageExpired:m=!1,items:_,onCounterValueChange:p,onClickStorageButton:g,onShipButtonClick:h,toShipDonors:y}=e,{t:v}=(0,l.QT)(),x=(0,i.useRouter)(),{data:b}=(0,T.n)(x.locale),toolTipNotAvailableHTML=()=>(0,n.jsx)(u.Z,{tag:"p",children:(0,n.jsx)("span",{children:v("myPage.cryostorage.toolTips.notAvailable")})}),C=(0,c.useMemo)(()=>{let e=_.reduce((e,t)=>{let a=e.find(e=>e.treatmentCountry===t.treatment_country),n={donor_alias:t.donor_alias,donor_id:t.donor_id,donor_image:t.donor_image,ejaculate_id:t.ejaculate_id,item_status:t.item_status,mot:t.mot,net_qty:t.net_qty,purchase_type:t.purchase_type,treatment_country:t.treatment_country,type:t.type};if(a)a.items=a.items||[],a.items.push(n);else{let a={isLimited:t.isLimited,items:[n],treatmentCountry:t.treatment_country};e.push(a)}return e},[]);return e},[_]);return(0,n.jsxs)("div",{className:r()(er().component,{[er().isDisabled]:d}),children:[(0,n.jsx)("div",{className:er().itemsContainer,children:null==C?void 0:C.map((e,i)=>{var s,l;return(0,n.jsxs)("div",{className:er().item,children:[(0,n.jsxs)("div",{className:er().header,children:[(0,n.jsx)("div",{className:er().imageWrapper,children:(0,n.jsx)(Q.Z,{alt:o.alt,className:r()({[er().donorImageBlur]:e.isLimited}),src:"".concat((0,V.e)((0,E.aM)(o.src),{height:768,width:768},"magento")),srcSet:[{media:"(max-width: 375px)",url:"".concat((0,V.e)((0,E.aM)(o.src),{height:375,width:375},"magento"))},{media:"(max-width: 768px)",url:"".concat((0,V.e)((0,E.aM)(o.src),{height:768,width:768},"magento"))}],unoptimized:!0})}),(0,n.jsxs)("div",{className:er().headerTextContainer,children:[(0,n.jsx)(u.Z,{tagStyle:"bodyMediumBold",children:a}),(0,n.jsx)(u.Z,{className:er().treatmentText,tagStyle:"bodySmall",children:"".concat(v("myPage.cryostorage.donorsOverview.tableHeader.treatmentCountry"),": ").concat(null===(s=(0,E.ep)(null!==(l=e.treatmentCountry)&&void 0!==l?l:"",b))||void 0===s?void 0:s.esb_translated_name)})]})]}),(0,n.jsx)("hr",{className:er().divider}),(0,n.jsx)("div",{children:(0,n.jsxs)("table",{className:er().table,children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:er().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:v("myPage.cryostorage.donorsOverview.tableHeader.type")})}),(0,n.jsx)("th",{className:er().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:v("myPage.cryostorage.donorsOverview.tableHeader.quantity")})}),(0,n.jsx)("th",{className:er().tableHeader,children:(0,n.jsx)(u.Z,{tagStyle:"bodySmall",children:v("myPage.cryostorage.donorsOverview.tableHeader.shipQuantity")})})]})}),(0,n.jsx)("tbody",{children:e.items.map((e,a)=>{let o=y.find(t=>t.donor_id===e.donor_id&&t.treatment_country===e.treatment_country&&t.mot===e.mot&&t.type===e.type);return(0,n.jsxs)("tr",{className:r()(er().tableRow,{[er().isLastRow]:_.length-1===a}),children:[(0,n.jsx)("td",{className:er().tableData,children:(0,n.jsx)(u.Z,{children:"".concat((0,et.Y)(v)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].label," (").concat((0,et.Y)(v)["mot".concat(e.mot,"_").concat(e.type.toLowerCase())].type,")")})}),(0,n.jsx)("td",{className:er().tableData,children:(0,n.jsx)(u.Z,{children:e.net_qty})}),(0,n.jsx)("td",{className:er().tableData,children:"CAN_SHIP"!==e.item_status?(0,n.jsx)("div",{className:er().toolTipContainer,children:(0,n.jsx)(ee.Z,{content:toolTipNotAvailableHTML(),triggerType:"Click"})}):(0,n.jsx)("div",{className:er().counterContainer,children:(0,n.jsx)($.Z,{disabled:t!==e.treatment_c
1ountry&&!!y.length,max:e.net_qty,onChange:p(e.treatment_country,e),value:null==o?void 0:o.strawQty,variant:"medium"},"".concat(JSON.stringify(o)))})})]},a)})})]})})]},i)})}),s?(0,n.jsx)(W.Z,{className:er().button,onClick:g,text:v("myPage.cryoStorage.donorsOverview.subscription.updatePaymentDetails"),variant:"tertiary"}):m&&(0,n.jsx)(W.Z,{className:er().button,onClick:g,text:v("myPage.cryostorage.donorsOverview.extendStorageButtonLabel"),variant:"tertiary"}),(0,n.jsx)(W.Z,{className:er().button,disabled:d,onClick:h,text:v("myPage.cryostorage.donorsOverview.shipButtonLabel"),variant:"tertiary"})]})};StorageCardSmall.displayName="StorageCardSmall";var ei=a(66360),es=a.n(ei);let UserHome=e=>{var t,a,o,D,H,U;let{blogPosts:Y,bookConsultationLink:W,cryoStorageSettings:Q,guidanceSlider:F}=e,[G,V]=(0,c.useState)(!1),[J,z]=(0,c.useState)(),[q,X]=(0,c.useState)([]),[K,$]=(0,c.useState)(!1),[ee,et]=(0,c.useState)([]),[ea,en]=(0,c.useState)(!1),[eo,er]=(0,c.useState)([]),{t:ei}=(0,l.QT)(),{setActiveComponent:el}=(0,I.xV)(),ec=(0,i.useRouter)(),{data:ed}=(0,s.useSession)(),{handleInvalidateQueries:eu,setActiveButton:em,setStorageDonorItems:e_}=(0,x.lO)(),[ep,eg]=(0,c.useState)(!1),eh=null==ed?void 0:null===(t=ed.user)||void 0===t?void 0:t.bearer_token,ey=(0,M.i)(parseInt(O().laptop)),ev=(0,M.i)(parseInt(O().tablet)),{data:ex}=(0,S.B)(),{data:eb}=(0,N.r)(eh,!!ex,ec.locale),[eC,eS]=(0,c.useState)(!1),{data:eN}=(0,j.t2)(eh,ec.locale),{data:ej}=(0,T.n)(ec.locale),{data:ef,isFetching:ew}=(0,f.v)(eh,ec.locale),{data:eT,refetch:eE}=(0,w.q)(eh,ec.locale),{isLoading:eP,isSuccess:eZ,mutate:eM,reset:eD}=(0,C.o)(eh,ec.locale),handleTranslation=e=>ei(e),handleGoToPLP=()=>ec.push((0,Z.a)(ec.locale,Z.g.PRODUCT_LIST)),handleGoToConsultation=()=>{(null==W?void 0:W.url)&&ec.push(W.url)};(0,c.useEffect)(()=>{eZ&&en(!0)},[eZ]);let eO=(0,c.useCallback)(()=>{if(!(null==ee?void 0:ee.length)){(0,d.ZP)(e=>(0,n.jsx)(p.Z,{id:e.id,message:ei("myPage.cryostorage.youNeedToChoose"),type:"general"}),{className:p.a.notificationsGeneral,duration:4e3,position:"bottom-left"});return}if(!(0,E.$4)(eb)&&(null==eb?void 0:eb.length)){eg(!0);return}ec.push((0,Z.a)(ec.locale,Z.g.CHECKOUT))},[eb,ee]);(0,c.useEffect)(()=>{(0,E.$4)(eb)||null!=eb&&eb.length||!ee.length||e_(ee)},[eb,ee]),(0,c.useEffect)(()=>{!eP&&eZ&&(eD(),eg(!1))},[eP,eZ]);let handleProcessCardCloseClick=e=>()=>{X(t=>[...t,e])},handlePhotoMatchWidgetClick=()=>{localStorage.setItem("esb-setPhotoMatch","true"),handleGoToPLP()},eA=(0,c.useCallback)((e,t)=>a=>{a>0&&e!==(null==eN?void 0:eN.treatment_country_id)&&(V(!0),z(e));let n=!!ee.filter(e=>e.donor_id===t.donor_id&&e.ejaculate_id===t.ejaculate_id&&e.treatment_country===t.treatment_country&&e.mot===t.mot&&e.type===t.type).length;if(n){let e=ee.map(e=>e.donor_id===t.donor_id&&e.ejaculate_id===t.ejaculate_id&&e.treatment_country===t.treatment_country&&e.mot===t.mot&&e.type===t.type?{...t,strawQty:a}:e);et(e)}else et([...ee,{...t,strawQty:a}])},[ee,null==eN?void 0:eN.treatment_country_id]);(0,c.useEffect)(()=>{let e=ee.find(e=>0===e.strawQty);e&&et(ee.filter(e=>0!==e.strawQty))},[ee]);let ek=(0,c.useMemo)(()=>null==ex?void 0:ex.id,[ex]);(0,c.useEffect)(()=>{if(!(null==ef?void 0:ef.favourite_donors)&&!(null==ef?void 0:ef.purchased_donors))return;let e=[];
1if(null==ef?void 0:ef.favourite_donors.length){let t=(0,B.convertItemsToDonorCardMediumProps)(null==ef?void 0:ef.favourite_donors,{icon:"Heart",isFilledIcon:!0},handleTranslation);t.length&&e.push(...t)}if(null==ef?void 0:ef.purchased_donors.length){let t=(0,B.convertItemsToDonorCardMediumProps)(null==ef?void 0:ef.purchased_donors,{icon:void 0},handleTranslation);t.length&&e.push(...t)}er(e)},[ef]);let eR=(0,c.useMemo)(()=>{if(eN&&ef){var e,t;let a=[],n={color:"green",icon:"Clinic",onClick:()=>el("UserTreatment"),text:ei("myPage.home.actionWidget.clinicText")},o={color:"blue",icon:"Photomatch",onClick:handlePhotoMatchWidgetClick,text:ei("myPage.home.actionWidget.photoMatchText")},r={color:"purple",icon:"Heart",onClick:handleGoToPLP,text:ei("myPage.home.actionWidget.findFavoriteDonorText")},i={color:"orange",headline:void 0,icon:"Calendar",onClick:handleGoToConsultation,text:ei("myPage.home.actionWidget.bookConsultationText")};return eN.associated_clinic_id||a.push(n),eN.has_photomatch||a.push(o),(null===(e=ef.purchased_donors)||void 0===e?void 0:e.length)||(null===(t=ef.favourite_donors)||void 0===t?void 0:t.length)||a.push(r),a.push(i),a}},[eN,ef]),eI=(0,c.useMemo)(()=>{if(F)return F.items.map((e,t)=>({...e,onClickIcon:handleProcessCardCloseClick(t),visual:"".concat(e.visual)})).filter((e,t)=>!q.includes(t))},[q]),eL=(0,c.useMemo)(()=>ey?4:ev?2:1.1,[ey,ev]),eB=(0,c.useMemo)(()=>{var e,t;if(eT)return(null===(e=eT.subscription)||void 0===e?void 0:e.reason_code_cancel_disallow.includes("SUSPENDED"))||(null===(t=eT.subscription)||void 0===t?void 0:t.reason_code_change_disallow.includes("SUSPENDED"))},[eT]),eH=(0,c.useMemo)(()=>ey?3:ev?2:1.1,[ey,ev]),eU=(0,c.useMemo)(()=>{if(J)return(0,E.ep)(J,ej)},[ej,J]),eY=(0,c.useMemo)(()=>(0,E.$4)(eb)?[]:null!=eb?eb:[],[eb]),eW=(0,c.useMemo)(()=>{if(eT){var e;let t=null==eT?void 0:null===(e=eT.storage_items)||void 0===e?void 0:e.reduce((e,t)=>{let a=e.find(e=>e.donorId===t.donor_id),n={donor_alias:t.donor_alias,donor_id:t.donor_id,donor_image:t.donor_image,ejaculate_id:t.ejaculate_id,isLimited:(null==eN?void 0:eN.purchase_profile)===j.QA.byNumber,item_status:t.item_status,mot:t.mot,net_qty:t.net_qty,purchase_type:t.purchase_type,treatment_country:t.treatment_country,type:t.type};if(a)a.items=a.items||[],a.items.push(n);else{let a={donorId:t.donor_id,donorName:t.donor_alias,image:{alt:t.donor_alias,src:(0,E.aM)(t.donor_image)},items:[n],onCounterValueChange:eA,onShipButtonClick:eO,setDonorCountryCode:z,setIsOpenChangeTreatment:V,toShipDonors:[],treatmentCountry:t.treatment_country};e.push(a)}return e},[]);return t}},[eT,ek,eY,eh,ev]),eQ=(0,c.useMemo)(()=>ev?1:1.1,[ev]);return((0,c.useEffect)(()=>{eu([E.MJ.CUSTOMER,E.MJ.MY_DONORS])},[]),eN)?(0,n.jsxs)("div",{className:es().component,children:[(0,n.jsxs)(b.Z,{className:es().firstRow,children:[(0,n.jsx)(v.Z,{children:(0,n.jsx)(u.Z,{tag:"h1",tagStyle:"headlineLarge",children:ei("myPage.home.headline").replace("%name%",eN.firstname)})}),ea&&(0,n.jsx)("div",{"aria-atomic":"true",className:es().hidden,role:"status",children:ei("accessibility.statusMessages.cartCleared")}),eR&&!!eR.length&&(null==eT?void 0:eT.status)==="NO_STORAGE"&&(0,n.jsx)(v.Z,{children:(0,n.jsx)("div",{className:es().actionWidgetColumn,children:eR.map((e,t)=>(0,n.jsx)(ActionWidget,{className:r()(es().actionWidget,{[es().isFullWidth]:eR.length%2!=0}),...e,size:eR.length%2!=0&&0===t?"full":"half"},t))})})]}),eW&&(null==eT?void 0:eT.status)!=="NO_STORAGE"&&(0,n.jsxs)(b.Z,{className:es().secondRow,children:[(0,n.jsxs)(v.Z,{className:es().secondRowFirstColumn,children:[(0,n.jsx)(u.Z,{tagStyle:"bodyLarge",text:ei("myPage.cryostorage.title")}),(0,n.jsx)(g.Z,{iconRight:"ChevronRight",onClick:()=>el("UserCryoStorage"),text:ei("myPage.home.gotoCryoStorage"),variant:"large"})]}),(0,n.jsxs)(v.Z,{children:[(null==eT?void 0:eT.status)==="EMPTY"&&(0,n.jsx)(StorageCard,{buttons:null==Q?void 0:null===(a=Q.activeEmptyStorageState)||void 0===a?void 0:a.buttons,headline:null==Q?void 0:null===(o=Q.activeEmptyStorageState)||void 0===o?void 0:o.headline,image:null==Q?void 0:null===(D=Q.activeEmptyStorageState)||void 0===D?void 0:D.image,text:null==Q?void 0:null===(H=Q.activeEmptyStorageState)||void 0===H?void 0:H.content}),(null==eT?void 0:eT.status)==="SETTING_UP"&&(0,n.jsx)(StorageCard,{buttons:null==Q?void 0:Q.withStorageState.buttons,headline:null==Q?void 0:Q.withStorageState.headline,image:null==Q?void 0:Q.withStorageState.image,text:null==Q?void 0:Q.withStorageState.content}),!!(null==eW?void 0:eW.length)&&((null==eT?void 0:eT.status)==="CAN_SHIP"||(null==eT?void 0:eT.status)==="NOT_SHIPPABLE")&&(0,n.jsx)(_.Z,{cellSpacing:24,contents:eW.map((e,t)=>ev?(0,n.jsx)(StorageCardLarge,{...e,customerCountryTreatmentCode:null==eN?void 0:eN.treatment_c
1ountry_id,isPaymentFailed:eT.subscription.reason_code_cancel_disallow.includes("PAYMENT_FAILED")||eT.subscription.reason_code_change_disallow.includes("PAYMENT_FAILED"),isShipButtonDisabled:(null==eT?void 0:eT.status)==="NOT_SHIPPABLE"&&(null==eT?void 0:eT.reason_code.includes("STORAGE_EXPIRED"))||eT.subscription.reason_code_cancel_disallow.includes("PAYMENT_FAILED")||eT.subscription.reason_code_change_disallow.includes("PAYMENT_FAILED"),isStorageExpired:(null==eT?void 0:eT.status)==="NOT_SHIPPABLE"&&(null==eT?void 0:eT.reason_code.includes("STORAGE_EXPIRED")),onClickStorageButton:P.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?()=>$(!0):()=>eS(!0),onCounterValueChange:eA,onShipButtonClick:eO,toShipDonors:ee},t):(0,n.jsx)(StorageCardSmall,{...e,customerCountryTreatmentCode:null==eN?void 0:eN.treatment_country_id,isPaymentFailed:eT.subscription.reason_code_cancel_disallow.includes("PAYMENT_FAILED")||eT.subscription.reason_code_change_disallow.includes("PAYMENT_FAILED"),isShipButtonDisabled:(null==eT?void 0:eT.status)==="NOT_SHIPPABLE"&&(null==eT?void 0:eT.reason_code.includes("STORAGE_EXPIRED"))||eT.subscription.reason_code_cancel_disallow.includes("PAYMENT_FAILED")||eT.subscription.reason_code_change_disallow.includes("PAYMENT_FAILED"),isStorageExpired:(null==eT?void 0:eT.status)==="NOT_SHIPPABLE"&&(null==eT?void 0:eT.reason_code.includes("STORAGE_EXPIRED")),onClickStorageButton:P.Z.ENABLE_SUBSCRIPTION_MANAGEMENT?()=>$(!0):()=>eS(!0),onCounterValueChange:eA,onShipButtonClick:eO,toShipDonors:ee},t)),controlPosition:ev&&eW.length>1?"bottomRight":void 0,slidesToShow:(null==eW?void 0:eW.length)>1?eQ:1})]})]}),!!eo.length&&(0,n.jsxs)(b.Z,{className:es().donorRow,children:[(0,n.jsxs)(v.Z,{className:es().donorColumn,children:[(0,n.jsx)(u.Z,{tag:"p",tagStyle:"bodyLarge",children:ei("myPage.menu.myDonors")}),eo.length>4&&(0,n.jsx)(g.Z,{iconRight:"ChevronRight",onClick:()=>ec.push("#my-donors"),text:ei("navigation.heart.favourites.goToMyDonors"),variant:"large"})]}),(0,n.jsx)(v.Z,{children:(0,n.jsx)(L.Z,{hasSidePadding:!0,items:eo,onQueryReset:eu,showControls:ev&&eo.length>1,variant:"mixDonor"})})]}),eI&&!!eI.length&&(0,n.jsxs)(b.Z,{className:es().thirdRow,children:[(null==F?void 0:F.title)&&(0,n.jsx)(v.Z,{children:(0,n.jsx)(u.Z,{tagStyle:"bodyLarge",text:F.title})}),(0,n.jsx)(v.Z,{children:(0,n.jsx)(_.Z,{cellSpacing:24,contents:eI.map((e,t)=>(0,n.jsx)(GuidanceCard,{...e},t)),controlPosition:ev&&eI.length>3?"bottomRight":void 0,slidesToShow:eL})})]}),!!(null==Y?void 0:Y.contentCards.length)&&(0,n.jsx)(b.Z,{children:(0,n.jsxs)(v.Z,{children:[(null==Y?void 0:Y.headline)&&(0,n.jsx)(u.Z,{className:es().blogPostsHeadline,tag:"h4",tagStyle:"bodyLarge",children:Y.headline}),(0,n.jsx)(_.Z,{cellSpacing:24,className:es().blogPostsCardSlider,contents:null==Y?void 0:Y.contentCards.map((e,t)=>(0,n.jsx)(m.Z,{...e},t)),controlPosition:ev?"bottomRight":void 0,slidesToShow:eH})]})}),!ew&&!((null==ef?void 0:ef.favourite_donors.length)||(null==ef?void 0:ef.purchased_donors.length))&&(0,n.jsx)(b.Z,{className:es().fourthRow,children:(0,n.jsx)(v.Z,{offset:{tablet:1},width:{tablet:10},children:(0,n.jsx)(h.Z,{buttons:[{icon:"Cart",text:ei("myPage.home.findDonor.buttonText"),url:(0,Z.a)(ec.locale,Z.g.PRODUCT_LIST)}],content:ei("myPage.home.findDonor.text"),headline:ei("myPage.home.findDonor.headline"),visual:"IllustrationUserSettingsAlt"})})}),(0,n.jsx)(R.Z,{cryoStorageManageSubscription:null==Q?void 0:Q.cryoStorageManageSubscription,isOpen:K,isStorageExpired:null==eT?void 0:eT.reason_code.includes("STORAGE_EXPIRED"),isSubscriptionSuspended:eB,onClose:()=>$(!1),refetchMyStorage:eE,storageExpiryDate:null!==(U=null==eT?void 0:eT.storage_expire_date)&&void 0!==U?U:void 0,subscription:null==eT?void 0:eT.subscription}),(0,n.jsx)(A.Z,{donorCountryCode:J,donorTreatmentCountry:null==eU?void 0:eU.esb_translated_name,isOpen:G,onClose:()=>V(!1),onQueryReset:()=>eu([E.MJ.CUSTOMER])}),!P.Z.ENABLE_SUBSCRIPTION_MANAGEMENT&&(0,n.jsx)(y.Z,{isOpen:eC,onClose:()=>{eS(!1)},onComplete:()=>{em("cart")},onQueryReset:()=>{eu([E.MJ.CART_ITEMS,E.MJ.DONOR_BY_NAME,E.MJ.DONOR_BY_NUMBER,E.MJ.STOCK,E.MJ.CART_TOTAL])}}),(0,n.jsx)(k.Z,{cancelText:ei("myPage.cryostorage.emptyCart.buttonCancelText"),confirmText:ei("myPage.cryostorage.emptyCart.buttonProceedText"),headline:ei("myPage.cryostorage.emptyCart.headline"),isOpen:ep,onClose:()=>eg(!1),onConfirm:()=>{eM({onlyDonorProducts:!1},{onSuccess:async()=>{ec.push((0,Z.a)(ec.locale,Z.g.CHECKOUT))}})},text:ei("myPage.cryostorage.emptyCart.text")})]}):null};UserHome.displayName="UserHome";var el=UserHome},50357:function(e,t,a){"use strict";var n=a(52322),o=a(12524),r=a.n(o),i=a(73090),s=a(72136),l=a(50087),c=a(75306),d=a.n(c),u=a(86255
1),m=a(94330),_=a.n(m);let DonorSlider=e=>{let{showControls:t,hasSidePadding:a=!1,items:o,onQueryReset:c,variant:m}=e,p=(0,l.i)(parseInt(d().laptop)),g=(0,l.i)(parseInt(d().tablet)),getVariant=e=>e.icon?"favouriteDonor":"purchasedDonor";return(0,n.jsx)(i.Z,{className:r()(_().component,{[_().hasSidePadding]:a}),contents:o.map((e,t)=>e.hasOwnProperty("headline")?(0,n.jsx)(s.Z,{...e},t):(0,n.jsx)(u.Z,{item:e,onQueryReset:c,variant:"mixDonor"===m?getVariant(e):m},t)),controlPosition:t?"bottomRight":void 0,slidesToShow:p?4:g?2:1.1})};DonorSlider.displayName="DonorSlider",t.Z=DonorSlider},86255:function(e,t,a){"use strict";a.d(t,{Z:function(){return b}});var n=a(52322),o=a(5632),r=a(23848),i=a(2784),s=a(28316),l=a(58767),c=a(7919),d=a(47343),u=a(31871),m=a(98929),_=a(50639),p=a(14235),g=a(17289),h=a(67478),y=a(73051),v=a.n(y),x=a(1755);let RemoveFavoriteModal=e=>{var t;let{closeAction:a,donorName:s,onQueryReset:l,productId:c,isOpen:d=!1}=e,{t:m}=(0,_.QT)(),{data:y}=(0,r.useSession)(),b=(0,o.useRouter)(),C=null==y?void 0:null===(t=y.user)||void 0===t?void 0:t.bearer_token,[S,N]=(0,i.useState)(!1),{data:j,isLoading:f,isSuccess:w,mutate:T,reset:E}=(0,x.A)(C,b.locale);return(0,i.useEffect)(()=>{!f&&w&&j&&!j.items.includes(c)&&(N(!0),l([u.MJ.MY_DONORS]),E(),a())},[j,w,f]),(0,n.jsx)(h.Z,{ariaLabelledBy:"".concat(m("myPage.donor.removeFavoriteModal.openingText")," ").concat(s," ").concat(m("myPage.donor.removeFavoriteModal.closingText")),className:v().component,isOpen:d,children:(0,n.jsxs)("div",{className:v().container,children:[(0,n.jsx)(g.Z,{className:v().headline,tag:"label",tagStyle:"headlineXSmall",children:"".concat(m("myPage.donor.removeFavoriteModal.openingText")," ").concat(s," ").concat(m("myPage.donor.removeFavoriteModal.closingText"))}),(0,n.jsx)(p.Z,{isLoading:f,onClick:()=>{T({option:"remove",productId:c})},text:m("myPage.donor.removeFavoriteModal.buttons.continueLabel"),variant:"tertiary"}),(0,n.jsx)(p.Z,{className:v().closeButton,onClick:a,text:m("myPage.donor.removeFavoriteModal.buttons.closeLabel"),variant:"quaternary"}),S&&(0,n.jsx)("div",{"aria-atomic":"true",className:v().hidden,role:"status",children:m("accessibility.statusMessages.donorRemovedFromFavourites")})]})})};RemoveFavoriteModal.displayName="RemoveFavoriteModal";let UserMyDonorCard=e=>{var t;let{item:a,onQueryReset:_,variant:p}=e,[g,h]=(0,i.useState)(!1),[y,v]=(0,i.useState)(!1),{data:x}=(0,r.useSession)(),b=null==x?void 0:null===(t=x.user)||void 0===t?void 0:t.bearer_token,C=(0,o.useRouter)(),{data:S}=(0,d.t2)(b,C.locale),N=document.getElementById("notificationCardOverlay");return(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)(l.Z,{cardVariantProps:{medium:{...a,disabledFillOveride:!0,isLimitedUser:(null==S?void 0:S.purchase_profile)===d.QA.byNumber,onClick:()=>{C.push((0,m.a)(C.locale,m.g.PRODUCT_DETAIL,a.name))},onClickIcon:()=>{if("subscribedDonor"===p)h(!0);else{if("favouriteDonor"!==p)return;v(!0)}},traits:"subscribedDonor"!==p?a.traits:[],treatmentCountry:"subscribedDonor"===p?a.treatmentCountryId:void 0}},variant:"medium"}),"favouriteDonor"===p&&(0,n.jsx)(RemoveFavoriteModal,{closeAction:()=>v(!1),continueAction:()=>{},donorName:a.name,isOpen:y,onQueryReset:_,productId:a.productId}),"subscribedDonor"===p&&N&&(0,s.createPortal)((0,n.jsx)(c.Z,{donorId:a.donorId,isOpen:g,onClose:()=>{h(!1),_([u.MJ.MY_DONORS])},stock:a.stock,treatmentCountryId:a.treatmentCountryId,type:a.type},"".concat(JSON.stringify(a.type))),N)]})};UserMyDonorCard.displayName="UserMyDonorCard";var b=UserMyDonorCard},71194:function(e,t,a){"use strict";a.r(t),a.d(t,{convertItemsToDonorCardMediumProps:function(){return convertItemsToDonorCardMediumProps},default:function(){return R}});var n=a(52322),o=a(5632),r=a(23848),i=a(50639),s=a(2784),l=a(76456),c=a(17289),d=a(35936),u=a(98067),m=a(31871),_=a(21796),p=a(1786),g=a(16897),h=a(28624),y=a(24450),v=a(28184),x=a(50087),b=a(75306),C=a.n(b),S=a(7125),N=a.n(S);let UserMyDonorEmpty=e=>{var t;let{myDonorsSettings:a}=e,o=(0,x.i)(parseInt(C().tablet)),[r,l]=(0,s.useState)([]),{t:d}=(0,i.QT)();return(0,s.useEffect)(()=>{var e;a&&l((null===(e=a.contentSlot1)||void 0===e?void 0:e.contentCards)||[])},[]),(0,n.jsxs)("div",{className:N().component,children:[(0,n.jsx)(c.Z,{tag:"h1",tagStyle:"headlineLarge",children:d("myPage.donor.title")}),a.emptyDonorState&&(0,n.jsx)(h.Z,{buttons:a.emptyDonorState.buttons||[],content:a.emptyDonorState.content,headline:a.emptyDonorState.headline,image:a.emptyDonorState.image}),(0,n.jsx)(v.Z,{children:(0,n.jsxs)(y.Z,{className:N().carouselColumn,children:[(0,n.jsx)(v.Z,{children:(0,n.jsx)(y.Z,{children:(0,n.jsx)(c.Z,{className:N().headline,tag:"h2",tagStyle:"headlineMedium",children:null==a?void 0:null===(t=a.contentSlot1)||void 0===t?void 0:t.headline})})}),r&&(0,n.jsx)(_.ZP,{cellSpacing:20,className:N().carousel,dragThreshold:.25,renderBottomCenterControls:()=>(0,n.jsx)(s.Fragment,{}),renderBottomRightControls:e=>{let{nextSlide:t,previousSlide:a}=e;return(0,n.jsxs)("div",{className:N().rightControls,children:[(0,n.jsx)("div",{className:N().control,onClick:a,children:(0,n.jsx)(p.Z,{name:"ArrowLeft"})}),(0,n.jsx)("div",{className:N().control,onClick:t,children:(0,n.jsx)(p.Z,{name:"ArrowRight"})})]})},renderCenterLeftControls:()=>(0,n.jsx)(s.Fragment,{}),renderCenterRightControls:()=>(0,n.jsx)(s.Fragment,{}),scrollMode:"remainder",slidesToShow:o?3:1,children:r.map((e,t)=>(0,n.jsx)(s.Fragment,{children:(0,n.jsx)(g.Z,{...e})},t))})]})})]})};UserMyDonorEmpty.displayName="UserMyDonorEmpty";var j=a(52508),f=a(62916),w=a(27999),T=a(50357),E=a(72136),P=a(86255
1),Z=a(33227),M=a.n(Z);let DonorsGrid=e=>{let{donorItem:t,onQueryReset:a,variant:o}=e;return(0,n.jsx)(v.Z,{className:M().component,children:t.map((e,t)=>e.hasOwnProperty("headline")?(0,n.jsx)(y.Z,{width:{laptop:3,tablet:6},children:(0,n.jsx)(E.Z,{className:M().tout,...e})},t):(0,n.jsx)(y.Z,{width:{laptop:3,tablet:6},children:(0,n.jsx)(P.Z,{item:e,onQueryReset:a,variant:o})},t))})};DonorsGrid.displayName="DonorsGrid";var D=a(88545),O=a.n(D);let UserMyDonorOverviewSubpage=e=>{let{copyMediaDetails:t,data:a=[],label:o="",onClick:r,onQueryReset:i,variant:s="purchasedDonor"}=e;return(0,n.jsxs)("div",{className:O().component,children:[(0,n.jsx)(v.Z,{className:O().headlineRow,children:(0,n.jsxs)(y.Z,{className:O().headlineColumn,onClick:()=>{r&&r()},children:[(0,n.jsx)(p.Z,{name:"ChevronLeft"}),(0,n.jsx)(c.Z,{className:O().headline,tag:"h2",tagStyle:"headlineLarge",children:o})]})}),(0,n.jsx)("div",{className:O().donorGridContainer,children:(0,n.jsx)(DonorsGrid,{donorItem:a,onQueryReset:i,variant:s})}),(0,n.jsx)(v.Z,{children:(0,n.jsx)(y.Z,{children:(0,n.jsx)(j.default,{alignment:null==t?void 0:t.alignment,color:"primary",headline:(null==t?void 0:t.headline)?null==t?void 0:t.headline:"",image:null==t?void 0:t.image,label:null==t?void 0:t.label,links:null==t?void 0:t.links,text:null==t?void 0:t.text})})})]})};UserMyDonorOverviewSubpage.displayName="UserMyDonorOverviewSubpage";var A=a(77025),k=a.n(A);let UserMyDonorOverview=e=>{let{favouriteDonors:t,isOnlyOneTypeDonors:a,myDonorsSettings:o,onQueryReset:r,purchasedDonors:l,subscribedDonors:d}=e,[u,m]=(0,s.useState)(!1),[_,p]=(0,s.useState)(t),[g,h]=(0,s.useState)(d),[x,b]=(0,s.useState)("purchasedDonor"),{t:C}=(0,i.QT)();(0,w.Z)(u,{top:0});let S=null==o?void 0:o.contentSlot6,N=null==o?void 0:o.contentSlot3,E=null==o?void 0:o.contentSlot5,handleChildFunction=()=>{m(!1)};return(0,s.useEffect)(()=>{p(t),h(d)},[t,d]),(0,s.useEffect)(()=>{if(!o||!(null==o?void 0:o.contentSlot2))return;let e=o.contentSlot2;if(_.length>=3&&!_.includes(e)){let a=t.map((t,a)=>2===a?[e,t]:t).flat();p(a)}},[t,_]),(0,s.useEffect)(()=>{if(!o||!(null==o?void 0:o.contentSlot4))return;let e=o.contentSlot4;if(g.length>=2&&!g.includes(e)){let t=g.map((t,a)=>1===a?[e,t]:t).flat();h(t)}},[d,g]),(0,n.jsxs)("div",{className:k().component,children:[u&&(0,n.jsxs)(s.Fragment,{children:["favouriteDonor"===x&&(0,n.jsx)(UserMyDonorOverviewSubpage,{copyMediaDetails:N,data:_,label:C("myPage.donor.overView.subPage.allFavourites"),onClick:handleChildFunction,onQueryReset:r,variant:x}),"subscribedDonor"===x&&(0,n.jsx)(UserMyDonorOverviewSubpage,{copyMediaDetails:E,data:g,label:C("myPage.donor.overView.subPage.allStockNotifications"),onClick:handleChildFunction,onQueryReset:r,variant:x})]}),!u&&(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)(c.Z,{className:k().donorHeadline,tag:"h2",tagStyle:"headlineLarge",children:C("myPage.donor.overView.headline")}),!!l.length&&(0,n.jsxs)(v.Z,{className:k().contentRow,children:[(0,n.jsx)(y.Z,{className:k().headlineColumn,children:(0,n.jsx)(c.Z,{className:k().headline,tag:"p",tagStyle:"bodyLarge",children:C("myPage.donor.overView.boughtDonor")})}),(0,n.jsx)(y.Z,{children:a?(0,n.jsx)(DonorsGrid,{donorItem:l,onQueryReset:r,variant:"purchasedDonor"}):(0,n.jsx)(T.Z,{items:l,onQueryReset:r,variant:"purchasedDonor"})})]}),!!t.length&&(0,n.jsxs)(v.Z,{className:k().contentRow,children:[(0,n.jsxs)(y.Z,{className:k().headlineColumn,children:[(0,n.jsx)(c.Z,{className:k().headline,tag:"p",tagStyle:"bodyLarge",children:C("myPage.donor.overView.favourites")}),!a&&(0,n.jsx)(f.Z,{className:k().seeAll,iconRight:"ChevronRight",onClick:()=>{m(!0),b("favouriteDonor")},text:C("myPage.donor.overView.seeAll"),variant:"large"})]}),(0,n.jsx)(y.Z,{children:a?(0,n.jsx)(DonorsGrid,{donorItem:_,onQueryReset:r,variant:"favouriteDonor"}):(0,n.jsx)(T.Z,{items:_,onQueryReset:r,variant:"favouriteDonor"})})]}),!!d.length&&(0,n.jsxs)(v.Z,{className:k().contentRow,children:[(0,n.jsxs)(y.Z,{className:k().headlineColumn,children:[(0,n.jsx)(c.Z,{className:k().headline,tag:"p",tagStyle:"bodyLarge",children:C("myPage.donor.overView.stockNotifications")}),!a&&(0,n.jsx)(f.Z,{className:k().seeAll,iconRight:"ChevronRight",onClick:()=>{m(!0),b("subscribedDonor")},text:C("myPage.donor.overView.seeAll"),variant:"large"})]}),(0,n.jsx)(y.Z,{children:a?(0,n.jsx)(DonorsGrid,{donorItem:g,onQueryReset:r,variant:"subscribedDonor"}):(0,n.jsx)(T.Z,{items:g,onQueryReset:r,variant:"subscribedDonor"})})]}),(0,n.jsx)(v.Z,{className:k().contentRow,children:(0,n.jsx)(y.Z,{children:(0,n.jsx)(j.default,{color:"primary",headline:(null==S?void 0:S.headline)||"",image:null==S?void 0:S.image,links:null==S?void 0:S.links,text:null==S?void 0:S.text})})})]}),(0,n.jsx)("div",{id:"notificationCardOverlay"})]})};UserMyDonorOverview.displayName="UserMyDonorOverview";let convertItemsToDonorCardMediumProps=(e,t,a)=>{let n=e.map(e=>{var n;return{...t,donorId:e.donor_id,id:"".concat(e.contract_type)===m.RJ.idRelease?a("donor.idRelease"):a("donor.noIdRelease"),image:{alt:e.donor_alias,src:(0,m.aM)(e.donor_image)},isLogIn:!0,labels:(0,m.An)(e.labels,e=>a(e)),name:e.donor_alias,productId:e.product_id,stock:e.stock,traits:null!==(n=(0,m.yQ)(";",e.keywords))&&void 0!==n?n:[],treatmentCountryId:e.treatment_c
1ountry_id,type:e.type}});return n},UserMyDonor=e=>{var t;let{myDonorsSettings:a}=e,[m,_]=(0,s.useState)(!1),[p,g]=(0,s.useState)([]),[h,y]=(0,s.useState)([]),[v,x]=(0,s.useState)([]),{handleInvalidateQueries:b}=(0,d.lO)(),{data:C,status:S}=(0,r.useSession)(),N=null==C?void 0:null===(t=C.user)||void 0===t?void 0:t.bearer_token,j=(0,o.useRouter)(),{data:f}=(0,u.v)(N,j.locale),{t:w}=(0,i.QT)(),handleTranslation=e=>w(e);return((0,s.useEffect)(()=>{if(!f)return;let{favourite_donors:e,purchased_donors:t,subscribed_donors:a}=f;if(!e||!t||!a)return;let n=!e.length&&!t.length&&!!a.length||!e.length&&!!t.length&&!a.length||!!e.length&&!t.length&&!a.length;_(n)},[f]),(0,s.useEffect)(()=>{if(!f)return;let{favourite_donors:e,purchased_donors:t,subscribed_donors:a}=f;e&&t&&a&&(g(convertItemsToDonorCardMediumProps(e,{icon:"Heart",isFilledIcon:!0},handleTranslation)),y(convertItemsToDonorCardMediumProps(t,{icon:void 0},handleTranslation)),x(convertItemsToDonorCardMediumProps(a,{icon:"Edit"},handleTranslation)))},[f]),"loading"!=S&&f)?"unauthenticated"==S?(0,n.jsx)(c.Z,{tag:"h3",children:"[You are not logged in]"}):(0,n.jsx)(s.Fragment,{children:f.favourite_donors.length||f.purchased_donors.length||f.subscribed_donors.length?(0,n.jsx)(UserMyDonorOverview,{favouriteDonors:p,isOnlyOneTypeDonors:m,myDonorsSettings:a,onQueryReset:b,purchasedDonors:h,subscribedDonors:v}):(0,n.jsx)(UserMyDonorEmpty,{myDonorsSettings:a})}):(0,n.jsx)(l.Z,{})};UserMyDonor.displayName="UserMyDonor";var R=UserMyDonor},8033:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return er}});var n=a(52322),o=a(12524),r=a.n(o),i=a(5632),s=a(23848),l=a(50639),c=a(2784),d=a(14235),u=a(1786),m=a(78167),_=a(79207),p=a(76456),g=a(17289),h=a(83529),y=a(24450),v=a(78576),x=a(35936),b=a(28184),C=a(82066),S=a(68569),N=a(31871),j=a(70850),use_mutation_create_treatment_reporting_report=()=>{var e;let t=(0,C.useQueryClient)(),a=(0,i.useRouter)(),{data:n}=(0,s.useSession)(),o=null==n?void 0:null===(e=n.user)||void 0===e?void 0:e.bearer_token,r=(0,C.useMutation)(async e=>{let t=await S.Z.fetch("en/rest/en/V2/treatment-reports",{body:JSON.stringify(e),headers:{"Accept-Language":(0,j.D)(a.locale),Authorization:"Bearer ".concat(o),"Content-Type":"application/json"},method:"POST"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationCreateTreatmentReport",e),e});return t},{onError:async e=>e,onSuccess:async()=>{t.invalidateQueries([N.MJ.TREATMENT_REPORT]),t.invalidateQueries([N.MJ.TREATMENT_REPORTS]),t.invalidateQueries([N.MJ.PENDING_TREATMENT_REPORTS])}});return r},use_mutation_update_treatment_reporting_report=e=>{var t;let{reportId:a}=e,n=(0,C.useQueryClient)(),o=(0,i.useRouter)(),{data:r}=(0,s.useSession)(),l=null==r?void 0:null===(t=r.user)||void 0===t?void 0:t.bearer_token,c=(0,C.useMutation)(async e=>{let t=await S.Z.fetch("en/rest/en/V2/treatment-reports/".concat(a),{body:JSON.stringify(e),headers:{"Accept-Language":(0,j.D)(o.locale),Authorization:"Bearer ".concat(l),"Content-Type":"application/json"},method:"PUT"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationUpdateTreatmentReport",e),e});return t},{onError:async e=>e,onSuccess:async()=>{n.invalidateQueries([N.MJ.TREATMENT_REPORT]),n.invalidateQueries([N.MJ.TREATMENT_REPORTS]),n.invalidateQueries([N.MJ.PENDING_TREATMENT_REPORTS])}});return c};let useQueryActivePregnancySlots=()=>{var e;let t=(0,i.useRouter)(),{data:a}=(0,s.useSession)(),n=null==a?void 0:null===(e=a.user)||void 0===e?void 0:e.bearer_token,o=(0,C.useQuery)([N.MJ.ACTIVE_PREGNANCY_SLOTS,t.locale,n],async()=>{let e=await S.Z.fetch("en/rest/en/V2/treatment-reports/active-pregnancy-slots",{headers:{"Accept-Language":(0,j.D)(t.locale),Authorization:"Bearer ".concat(n),"Content-Type":"application/json"},method:"GET"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useQueryActivePregnancySlots",e),e});return e},{enabled:!!n,keepPreviousData:!0,staleTime:N.ip});return o};var f=a(52791),w=a(47343),T=a(34733),E=a(94387),P=a(30075),Z=a(30909),M=a(55043),D=a(63955),O=a(33421),A=a(96416),k=a(85209),R=a(42141),I=a(81924),L=a(65679),B=a(61521),H=a(17154),U=a.n(H);let TreatmentReportCurtain=e=>{var t,a,o,m,_,p;let{customer:y,disableClickOutsideClosure:v,isLoading:x=!1,isOpen:b=!1,isUpdateState:C=!1,onClose:S,onCreate:N,onSelectDonor:j,onTreatmentClinicClick:w,onUpdate:T,selectedTreatmentClinic:E,selectedTreatmentReport:P,treatmentReportCurtainContent:Z}=e,{t:H}=(0,l.QT)(),{data:Y}
1=(0,s.useSession)(),W=null==Y?void 0:null===(t=Y.user)||void 0===t?void 0:t.bearer_token,Q=(0,i.useRouter)(),{data:F}=useQueryActivePregnancySlots(),{data:G}=(0,f.M)(null!=E?E:null==P?void 0:P.clinic_id,Q.locale,W),V=(0,c.useMemo)(()=>{if(!F)return[];let e=new Set;return F.filter(t=>void 0===t.donor_number||!e.has(t.donor_number)&&(e.add(t.donor_number),!0)).map(e=>{var t;let a=null!==(t=e.donor_alias)&&void 0!==t?t:"",n=e.donor_number;return{text:n?"".concat(a," (").concat(n,")"):a,value:a}})},[F]),handleSelectDonor=e=>{let t=null==F?void 0:F.filter(t=>t.donor_alias===(null==e?void 0:e.value));if(!(null==t?void 0:t.length))return;let a=[];t.forEach(e=>{e.treatment_country&&a.push(e.treatment_country)}),(null==a?void 0:a.length)&&(null==j||j(a))},J=(0,c.useMemo)(()=>E||(null==P?void 0:P.clinic_id)?G:null,[E,P,G]),{control:z,formState:{isValid:q},handleSubmit:X,reset:K,setValue:$}=(0,D.cI)({defaultValues:{childGender:null!==(a=null==P?void 0:P.child_gender)&&void 0!==a?a:"",childType:P?P.is_sibling?"sibling":!1===P.is_sibling?"first_child":"":"",donor:null!==(o=null==P?void 0:P.donor_alias)&&void 0!==o?o:"",treatmentClinic:null!=G?G:null,treatmentDate:null!==(m=null==P?void 0:P.treatment_date)&&void 0!==m?m:"",treatmentOutcome:null!==(_=null==P?void 0:P.treatment_outcome)&&void 0!==_?_:"",treatmentType:null!==(p=null==P?void 0:P.treatment_type)&&void 0!==p?p:""},mode:"onChange"});(0,c.useEffect)(()=>{var e,t,a,n,o;K({childGender:null!==(e=null==P?void 0:P.child_gender)&&void 0!==e?e:"",childType:P?P.is_sibling?"sibling":!1===P.is_sibling?"first_child":"":"",donor:null!==(t=null==P?void 0:P.donor_alias)&&void 0!==t?t:"",treatmentClinic:null!=G?G:null,treatmentDate:null!==(a=null==P?void 0:P.treatment_date)&&void 0!==a?a:"",treatmentOutcome:null!==(n=null==P?void 0:P.treatment_outcome)&&void 0!==n?n:"",treatmentType:null!==(o=null==P?void 0:P.treatment_type)&&void 0!==o?o:""})},[K,P,G]),(0,c.useEffect)(()=>{$("treatmentClinic",null!=J?J:null,{shouldValidate:!0})},[J,$]);let ee=(0,c.useMemo)(()=>["IVF","ICSI","IUI"],[]),et=(0,c.useMemo)(()=>{let e=C&&(null==P?void 0:P.treatment_outcome)==="PREGNANCY";return[{description:H("b2b.myPage.values.pregnancyOutcomes.PREGNANCY.description"),isDisabled:!!P&&(null==P?void 0:P.treatment_outcome)!=="PREGNANCY",label:H("b2b.myPage.values.pregnancyOutcomes.PREGNANCY.name"),value:"PREGNANCY"},{description:H("b2b.myPage.values.pregnancyOutcomes.LIVE_BIRTH.description"),isDisabled:!e,label:H("b2b.myPage.values.pregnancyOutcomes.LIVE_BIRTH.name"),value:"LIVE_BIRTH"},{description:H("b2b.myPage.values.pregnancyOutcomes.MISCARRIAGE.description"),isDisabled:!e,label:H("b2b.myPage.values.pregnancyOutcomes.MISCARRIAGE.name"),value:"MISCARRIAGE"}]},[C,P]);return(0,n.jsx)(L.Z,{children:(0,n.jsx)(R.Z,{className:U().component,containerClassName:U().overlayContainer,contentClassName:U().overlayContent,disableClickOutsideClosure:v,isOpen:b,onClose:()=>{K(),S()},position:"right",children:(0,n.jsxs)("div",{className:U().container,children:[(0,n.jsx)("button",{className:U().iconContainer,onClick:S,children:(0,n.jsx)(u.Z,{name:"Close"})}),(0,n.jsxs)("div",{className:U().header,children:[(0,n.jsx)(g.Z,{className:U().headline,tagStyle:"headlineSmall",children:Z.headline}),Z.text&&(0,n.jsx)(g.Z,{tagStyle:"bodySmall",children:Z.text})]}),(0,n.jsx)(M.E,{className:U().content,element:"div",options:{overflow:{x:"hidden",y:"scroll"},scrollbars:{theme:U().scrollbar}},children:(0,n.jsxs)("form",{className:U().form,children:[(0,n.jsxs)("div",{className:U().detailsContainer,children:[(0,n.jsx)(D.Qr,{control:z,name:"treatmentDate",render:e=>{let{field:t}=e;return(0,n.jsx)(A.Z,{className:U().datePicker,disableClickOutsideClosure:!0,disableFuture:!0,isLocked:C,label:H("b2b.myPage.common.treatmentDate"),onChange:e=>{t.onChange(e)},title:H("b2b.myPage.common.treatmentDate"),usePortal:!0,value:t.value})},rules:{required:!0}}),(0,n.jsx)(D.Qr,{control:z,name:"donor",render:e=>{let{field:t}=e;return(0,n.jsx)(k.Z,{isLocked:C,label:H("b2b.myPage.common.donor"),onChange:e=>{var a;t.onChange(null!==(a=null==e?void 0:e.value)&&void 0!==a?a:""),handleSelectDonor(e)},options:V,value:V.find(e=>e.value===t.value)})},rules:{required:!0}}),(0,n.jsxs)("div",{className:r()(U().sectionWrapper,{[U().isDisabled]:C}),children:[(0,n.jsxs)("div",{className:U().sectionHeadline,children:[(0,n.jsx)(g.Z,{tagStyle:"bodySmall",children:H("myPage.treatment.treatmentClinic")}),(0,n.jsx)("button",{className:U().changeClinicLink,onClick:w,children:(0,n.jsx)(g.Z,{tagStyle:"bodySmall",children:H("myPage.treatment.changeClinic")})})]}),(0,n.jsx)(D.Qr,{control:z,name:"treatmentClinic",render:e=>{let{field:t}=e;return J?(0,n.jsxs)("button",{className:r()(U().mapCard,{[U().isAutomaticReporting]:J.automatic_pregnancy_reporting}),onClick:e=>{e.preventDefault(),t.onChange(J.clinic_name),null==w||w()},type:"button",children:[(0,n.jsx)("div",{className:U().mapImageWrapper,children:(0,n.jsx)(h.Z,{...J,address:"".concat(J.clinic_name,", ").concat(J.address.street,", ").concat(J.address.postcode," ").concat(J.address.city),className:U().mapImage,height:190,name:J.clinic_name,width:190})}),(0,n.jsxs)("div",{className:U().mapTextBlock,children:[(0,n.jsx)("div",{children:(0,n.jsx)(g.Z,{className:U().mapClinicNameEllipsis,tag:"p",tagStyle:"bodySmallBold",children:J.clinic_name})}),(0,n.jsx)("div",{className:U().mapFooter,children:(0,n.jsx)("div",{children:(0,n.jsx)(g.Z,{tag:"p",tagStyle:"bodySmall",children:(0,B.T)({city:"".concat(J.address.city),postalCode:"".concat(J.address.postcode),street:"".concat(J.address.street)})})})})]})]}):(0,n.jsxs)("button",{className:U().noClinicWrapper,onClick:w,children:[(0,n.jsx)(g.Z,{tagStyle:"headlineXSmall",children:H("commons.myClinic")}),(0,n.jsxs)("div",{className:U().addClinicLink,children:[(0,n.jsx)(g.Z,{children:H("commons.add")}),(0,n.jsx)(u.Z,{name:"ChevronRight"})]})]})},rules:{required:!0}}),(null==J?void 0:J.automatic_pregnancy_reporting)&&(0,n.jsx)(O.Z,{className:U().automaticPregnancyReportingNudge,color:"red",items:[{icon:"Warning",text:H("myPage.treatment.integrationClinicWarning")}]})]})]}),(0,n.jsxs)("div",{className:U().sectionWrapper,children:[(0,n.jsx)("div",{className:U().sectionHeadline,children:(0,n.jsx)(g.Z,{tagStyle:"bodySmall",children:H("b2b.myPage.common.childType")})}),(0,n.jsx)("div",{className:U().valuesWrapper,children:(0,n.jsx)(D.Qr,{control:z,name:"childType",render:e=>{let{field:t}=e;return(0,n.jsxs)("div",{className:U().radioBoxWrapper,children:[(0,n.jsx)(I.Z,{isChecked:"first_child"===t.value,isDisabled:C,onChange:()=>
1{t.onChange("first_child")},textTagStyle:"bodySmall",title:H("b2b.myPage.values.childTypes.firstChild.name"),value:"first_child"}),(0,n.jsx)(I.Z,{isChecked:"sibling"===t.value,isDisabled:C,onChange:()=>{t.onChange("sibling")},textTagStyle:"bodySmall",title:H("b2b.myPage.values.childTypes.sibling.name"),value:"sibling"})]})},rules:{required:!0}})})]}),(0,n.jsxs)("div",{className:U().sectionWrapper,children:[(0,n.jsx)("div",{className:U().sectionHeadline,children:(0,n.jsx)(g.Z,{tagStyle:"bodySmall",children:H("b2b.myPage.common.childGender")})}),(0,n.jsx)("div",{className:U().valuesWrapper,children:(0,n.jsx)(D.Qr,{control:z,name:"childGender",render:e=>{let{field:t}=e;return(0,n.jsxs)("div",{className:U().radioBoxWrapper,children:[(0,n.jsx)(I.Z,{isChecked:"MALE"===t.value,onChange:()=>{t.onChange("MALE")},textTagStyle:"bodySmall",title:H("b2b.myPage.values.genders.male.name"),value:"MALE"}),(0,n.jsx)(I.Z,{isChecked:"FEMALE"===t.value,onChange:()=>{t.onChange("FEMALE")},textTagStyle:"bodySmall",title:H("b2b.myPage.values.genders.female.name"),value:"FEMALE"})]})},rules:{required:!0}})})]}),(0,n.jsxs)("div",{className:U().sectionWrapper,children:[(0,n.jsx)("div",{className:U().sectionHeadline,children:(0,n.jsx)(g.Z,{tagStyle:"bodySmall",children:H("b2b.myPage.common.treatmentType")})}),(0,n.jsx)("div",{className:U().valuesWrapper,children:(0,n.jsx)(D.Qr,{control:z,name:"treatmentType",render:e=>{let{field:t}=e;return(0,n.jsx)("div",{className:U().radioBoxWrapper,children:ee.map(e=>(0,n.jsx)(I.Z,{isChecked:t.value===e,isDisabled:C,onChange:()=>{t.onChange(e)},textTagStyle:"bodySmall",title:e,value:e},e))})},rules:{required:!0}})})]}),(0,n.jsxs)("div",{className:U().sectionWrapper,children:[(0,n.jsx)("div",{className:U().sectionHeadline,children:(0,n.jsx)(g.Z,{tagStyle:"bodySmall",children:H("b2b.myPage.common.outcome")})}),(0,n.jsx)("div",{className:U().valuesWrapper,children:(0,n.jsx)(D.Qr,{control:z,name:"treatmentOutcome",render:e=>{let{field:t}=e;return(0,n.jsx)("div",{className:U().treatmentReportOutcomesWrapper,children:et.map(e=>(0,n.jsx)(I.Z,{isChecked:t.value===e.value,isDisabled:e.isDisabled,onChange:()=>{t.onChange(e.value)},text:e.description,textTagStyle:"bodySmall",title:e.label,value:e.value},e.value))})},rules:{required:!0}})})]})]})}),(0,n.jsx)("div",{className:U().buttonContainer,children:(0,n.jsx)(d.Z,{className:U().button,disabled:((null==J?void 0:J.automatic_pregnancy_reporting)||!q)&&!C,isLoading:x,onClick:X(e=>{var t,a;let n=null==F?void 0:null===(t=F.find(t=>t.donor_alias===e.donor))||void 0===t?void 0:t.donor_number,o={...P,child_gender:e.childGender,clinic_id:null!=E?E:null==P?void 0:P.clinic_id,donor_alias:e.donor||null,donor_number:n,is_sibling:"sibling"===e.childType||"first_child"!==e.childType&&void 0,patient_residence:null!==(a=y.residence_country_id)&&void 0!==a?a:void 0,treatment_date:e.treatmentDate||void 0,treatment_outcome:e.treatmentOutcome,treatment_type:e.treatmentType};if(C){T(o);return}N(o)}),text:Z.ctaButtonText,variant:"primary"})})]})})})};TreatmentReportCurtain.displayName="TreatmentReportCurtain",a(27858);var Y=a(65561),W=a(65239),Q=a(25648),F=a(99163),G=a(50087),V=a(75306),J=a.n(V),z=a(53328),q=a.n(z);let ClinicTableRowActions=e=>{let{actions:t=[],onClickOutside:a}=e,{t:o}=(0,l.QT)(),i=(0,G.i)(parseInt(J().laptop)),[s,d]=(0,c.useState)(!0),m=(0,c.useRef)(null);(0,F.Z)(m,()=>{i&&a()});let handleClose=()=>{d(!1)};return i?(0,n.jsx)("div",{className:q().component,ref:m,children:t.map(e=>(0,n.jsxs)("button",{className:q().actionButton,onClick:e.onClick,children:[(0,n.jsx)(u.Z,{name:e.icon,size:12}),(0,n.jsx)(g.Z,{tagStyle:"bodyXSmall",children:e.label})]},e.label))}):(0,n.jsx)(L.Z,{children:(0,n.jsx)("div",{className:r()(q().component,q().isMobile),children:(0,n.jsx)(W.M,{onExitComplete:a,children:s&&(0,n.jsxs)(c.Fragment,{children:[(0,n.jsx)(Q.E.div,{animate:{opacity:1},className:q().overlay,exit:{opacity:0},initial:{opacity:0}
1,onClick:handleClose,transition:{duration:.3}},"overlay"),(0,n.jsxs)(Q.E.div,{animate:{y:0},className:q().panel,exit:{y:"100%"},initial:{y:"100%"},transition:{duration:.3,ease:"easeInOut"},children:[(0,n.jsxs)("div",{className:q().panelHeader,children:[(0,n.jsx)(g.Z,{tagStyle:"bodySmallBold",children:o("b2b.myPage.common.actions")}),(0,n.jsx)("button",{className:q().closeButton,onClick:handleClose,children:(0,n.jsx)(u.Z,{name:"Close"})})]}),(0,n.jsx)("div",{children:t.map(e=>(0,n.jsxs)("button",{className:q().actionButton,onClick:e.onClick,children:[(0,n.jsx)(u.Z,{name:e.icon}),(0,n.jsx)(g.Z,{tagStyle:"bodyXSmall",children:e.label})]},e.label))})]},"panel")]})})})})};ClinicTableRowActions.displayName="ClinicTableRowActions";var X=a(28879),K=a.n(X),format_date=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"short";if(e)return"long"===t?K()(e).format("MMM D, YYYY"):K()(e).format("DD.MM.YYYY")},$=a(43685),ee=a.n($),et=a(42503),ea=a(8578),en=a(31581),eo=a.n(en);let UserTreatment=e=>{var t,a,o,C,S,j,M,D,O;let{treatmentSettings:A}=e,{t:k}=(0,l.QT)(),{handleInvalidateQueries:R,settings:I}=(0,x.lO)(),L=(0,i.useRouter)(),[B,H]=(0,c.useState)(!1),[U,Y]=(0,c.useState)(!1),[W,Q]=(0,c.useState)("view"),[F,G]=(0,c.useState)(null),[V,J]=(0,c.useState)(null),[z,q]=(0,c.useState)(null),[X,K]=(0,c.useState)(!1),[$,ee]=(0,c.useState)(null),{data:et,status:en}=(0,s.useSession)(),er=null==et?void 0:null===(t=et.user)||void 0===t?void 0:t.bearer_token,{data:ei,isFetching:es}=(0,w.t2)(er,L.locale),{data:el,isFetching:ec}=(0,f.M)(null==ei?void 0:ei.associated_clinic_id,L.locale,er),{data:ed}=(0,T.n)(L.locale),{data:eu}=useQueryActivePregnancySlots(),{isLoading:em,mutate:e_}=use_mutation_update_treatment_reporting_report({reportId:null!==(D=null==F?void 0:F.treatment_report_id)&&void 0!==D?D:""}),{isLoading:ep,mutate:eg}=use_mutation_create_treatment_reporting_report(),[eh,ey]=(0,c.useState)(""),ev=!!((null==el?void 0:el.clinic_discount_shipment)||(null==el?void 0:el.clinic_discount_straw)),handleOverlayOpen=()=>{H(!0)},handleOverlayClose=()=>{H(!1),G(null)},handleCloseTreatmentReportCurtain=()=>{Y(!1),ee(null),q(null),G(null),J(null)},handleSuccessTreatmentReport=()=>{handleCloseTreatmentReportCurtain(),G(null)},getCountryTranslation=e=>{let t=null==ed?void 0:ed.find(t=>t.esb_alpha2_iso_code===e);t&&ey(t.esb_translated_name)},ex=(0,c.useMemo)(()=>{var e,t;return(0,E.S)(null==I?void 0:I.clinicAdvantages.clinicDiscountInformation,null==el?void 0:null===(e=el.clinic_discount_straw)||void 0===e?void 0:e.discount_percent,null==el?void 0:null===(t=el.clinic_discount_shipment)||void 0===t?void 0:t.discount_percent)},[null==I?void 0:I.clinicAdvantages.clinicDiscountInformation,el]);(0,c.useEffect)(()=>{R([N.MJ.CUSTOMER,N.MJ.CLINIC])},[]);let eb=(0,c.useMemo)(()=>el&&(null==eu?void 0:eu.length)&&!(null==el?void 0:el.automatic_pregnancy_reporting)?"eligible":(null==eu?void 0:eu.length)&&(null==el?void 0:el.automatic_pregnancy_reporting)?"integration-partner":((null==eu?void 0:eu.length)||(null==el?void 0:el.automatic_pregnancy_reporting))&&(null==ei?void 0:ei.associated_clinic_id)?void 0:"not-eligible",[eu,el,null==ei?void 0:ei.associated_clinic_id]);(0,c.useEffect)(()=>{el&&getCountryTranslation(null==el?void 0:el.address.country_id)},[el]);let eC=(0,c.useMemo)(()=>{switch(W){case"report":return{ctaButtonText:k("myPage.treatment.outcomeReportingCtas.submit"),headline:A.outcomeReporting.reportOutcome.headline,text:A.outcomeReporting.reportOutcome.subHeadline};case"update":return{ctaButtonText:k("myPage.treatment.outcomeReportingCtas.update"),headline:A.outcomeReporting.updateOutcomeReport.headline,text:A.outcomeReporting.updateOutcomeReport.subHeadline};case"view":return{ctaButtonText:k("myPage.treatment.outcomeReportingCtas.update"),headline:A.outcomeReporting.viewOutcomeReport.headline,text:A.outcomeReporting.viewOutcomeReport.subHeadline}}},[W,A]);if("loading"===en||!ei||ec||!ed||es)return(0,n.jsx)(p.Z,{});if("unauthenticated"===en)return(0,n.jsx)(g.Z,{className:eo().headline,tag:"h3",children:"[You are not logged in]"});let eS=[{className:eo().button,onClick:handleOverlayOpen,text:k("myPage.myClinic.emptyClinic.addClinicButtonText"),variant:"tertiary"}];return(null===(o=A.yourClinic.noClinicAdded)||void 0===o?void 0:null===(a=o.buttons)||void 0===a?void 0:a.length)&&eS.push({className:eo().button,...A.yourClinic.noClinicAdded.buttons[0],variant:"quaternary"}),(0,n.jsxs)("div",{className:r()(eo().component,{[eo().hasClinicDiscounts]:ev,[eo().hasTreatmentReporting]:("eligible"===eb||"integration-partner"===eb)&&!1}),children:[(0,n.jsx)(b.Z,{children:(0,n.jsxs)(y.Z,{width:{laptop:12},children:[(0,n.jsx)(g.Z,{className:eo().headline,tag:"h2",tagStyle:"headlineLarge",children:k("myPage.myClinic.headline")}),(0,n.jsxs)(b.Z,{className:eo().contentRow,children:[(0,n.jsx)(y.Z,{className:eo().clinicColumn,width:{laptop:4},children:(0,n.jsxs)("div",{className:eo().clinicWrapper,children:[(0,n.jsxs)("div",{className:eo().clinicTop,children:[(0,n.jsx)(g.Z,{tagStyle:"bodyLargeBold",children:k("myPage.yourClinic")}),!!ei.associated_clinic_id&&(0,n.jsx)(c.Fragment,{children:(0,n.jsx)("button",{className:eo().changeClinicButton,onClick:handleOverlayOpen,children:(0,n.jsx)(g.Z,{children:k("myPage.myClinic.withClinic.changeClinicButtonText")})})})]}),ei.associated_clinic_id?(0,n.jsxs)(c.Fragment,{children:[(0,n.jsx)("div",{className:eo().mapImageWrapper,children:(0,n.jsx)(h.Z,{address:"".concat(null==el?void 0:el.clinic_name,", ").concat(null==el?void 0:el.address.street[0],", ").concat(null==el?void 0:el.address.postcode," ").concat(null==el?void 0:el.address.city),className:eo().mapImage,height:240,latitude:Number(null==el?void 0:el.latitude),longitude:Number(null==el?void 0:el.longitude),name:String(null==el?void 0:el.clinic_name),width:240})}),(0,n.jsx)(g.Z,{className:eo().clinicName,tagStyle:"bodyMediumBlogBold",children:null==el?void 0:el.clinic_name}),(0,n.jsxs)("div",{className:eo().contactDetailsWrapper,children:[(null==el?void 0:el.address)&&(0,n.jsxs)("div",{className:eo().contactField,children:[(0,n.jsx)("div",{className:eo().contactIcon,children:(0,n.jsx)(u.Z,{name:"Location",size:20})}),(0,n.jsx)(g.Z,{className:eo().contactText,children:"".concat(el.address.street[0],", ").concat(el.address.postcode,", ").concat(eh,", ").concat(el.address.city)})]}
1),(null==el?void 0:el.address.telephone)&&(0,n.jsxs)(v.Z,{className:eo().contactField,url:"tel:".concat(el.address.telephone),children:[(0,n.jsx)(u.Z,{className:eo().contactIcon,name:"Phone",size:20}),(0,n.jsx)(g.Z,{className:eo().contactText,tag:"p",tagStyle:"bodyMedium",children:el.address.telephone})]}),(null==el?void 0:el.esb_external_contact_email)&&(0,n.jsxs)(v.Z,{className:eo().contactField,url:"mailto:".concat(el.esb_external_contact_email),children:[(0,n.jsx)(u.Z,{className:eo().contactIcon,name:"Email",size:20}),(0,n.jsx)(g.Z,{className:eo().contactText,tag:"p",tagStyle:"bodyMedium",children:el.esb_external_contact_email})]}),(null==el?void 0:el.esb_website_u_r_l)&&(0,n.jsxs)(v.Z,{className:eo().contactField,target:"_blank",url:null==el?void 0:el.esb_website_u_r_l,children:[(0,n.jsx)(u.Z,{className:eo().contactIcon,name:"Countries",size:20}),(0,n.jsx)(g.Z,{className:eo().contactText,tag:"p",tagStyle:"bodyMedium",children:k("myPage.myClinic.clinicFinder.addClinicDetail.clinicWebsiteLinkText")})]})]}),ev&&(null==I?void 0:I.clinicAdvantages.clinicDiscountInformation)&&(0,n.jsxs)("div",{className:eo().clinicDiscountsWrapper,children:[(0,n.jsxs)("div",{className:eo().clinicDiscountsHeader,children:[(0,n.jsx)(u.Z,{name:"Discount"}),(0,n.jsx)(g.Z,{tagStyle:"bodyMediumBlogBold",children:(0,Z.m)(null==I?void 0:I.clinicAdvantages.clinicDiscountInformation.headline,{clinic:String(null==el?void 0:el.clinic_name)})})]}),ex.length>1?(0,n.jsx)("ul",{className:eo().list,children:ex.map((e,t)=>(0,n.jsx)("li",{className:eo().listItem,children:(0,n.jsx)(g.Z,{children:e})},t))}):(0,n.jsx)(g.Z,{children:ex})]})]}):(0,n.jsxs)(c.Fragment,{children:[(0,n.jsx)("div",{className:eo().imageWrapper,children:(0,n.jsx)(m.Z,{alt:null!==(O=A.yourClinic.noClinicAdded.image.altText)&&void 0!==O?O:"",className:eo().image,src:(0,P.e)(A.yourClinic.noClinicAdded.image.url,{height:768,width:768},"umbraco"),srcSet:[{media:"(max-width: 768px)",url:(0,P.e)(A.yourClinic.noClinicAdded.image.url,{height:768,width:768},"umbraco")}],unoptimized:!0})}),(0,n.jsx)(_.Z,{className:eo().noClinicContent,text:A.yourClinic.noClinicAdded.content}),(0,n.jsxs)("div",{className:eo().noClinicButtons,children:[(0,n.jsx)(d.Z,{className:eo().addClinicButton,icon:"Plus",onClick:handleOverlayOpen,text:"Add my clinic",variant:"tertiary"}),(0,n.jsx)(v.Z,{className:eo().contactLink,url:null===(S=A.yourClinic.noClinicAdded.buttons)||void 0===S?void 0:null===(C=S[0])||void 0===C?void 0:C.url,children:null===(M=A.yourClinic.noClinicAdded.buttons)||void 0===M?void 0:null===(j=M[0])||void 0===j?void 0:j.text})]})]})]})}),!1]})]})}),(0,n.jsx)(TreatmentReportCurtain,{customer:ei,disableClickOutsideClosure:B,isLoading:ep||em,isOpen:U,isUpdateState:"report"!==W,onClose:handleCloseTreatmentReportCurtain,onCreate:e=>{eg({report:e},{onSuccess:handleSuccessTreatmentReport})},onSelectDonor:e=>{null!==$&&z&&!e.includes(z)&&(ee(null),q(null)),J(e)},onTreatmentClinicClick:()=>{K(!0),handleOverlayOpen()},onUpdate:e=>{e_({report:e},{onSuccess:handleCloseTreatmentReportCurtain})},selectedTreatmentClinic:$,selectedTreatmentReport:F,treatmentReportCurtainContent:eC}),(0,n.jsx)(ea.Z,{headline:k("myPage.myClinic.headline"),isOpen:B,isTreatmentClinicReporting:X,onClose:handleOverlayClose,onSelectTreatmentClinic:e=>{var t,a;ee(null!==(t=e.esb_m2_id)&&void 0!==t?t:null),q(null!==(a=e.clinic_residence_country)&&void 0!==a?a:null),handleOverlayClose()},pageIndicator:"userPageTreatment",showMoreClinicData:!0,treatmentCountries:V})]})};UserTreatment.displayName="UserTreatment";var er=UserTreatment},67478:function(e,t,a){"use strict";var n=a(52322),o=a(12524),r=a.n(o),i=a(2784),s=a(28316),l=a(46359),c=a(63508),d=a.n(c);let u=(0,i.forwardRef)((e,t)=>{let{ariaLabelledBy:a,children:o,className:c,isOpen:u=!1,isSignupFlow:m=!1}=e,[_,p]=(0,i.useState)(!1);if((0,i.useEffect)(()=>{p(!0)},[]),(0,i.useEffect)(()=>(u?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[u]),!1===_)return null;let g=document.getElementById("portal");return m?(0,s.createPortal)((0,n.jsx)("div",{ref:t,className:r()(d().component,{[d().isOpen]:u},c),children:o}),g):(0,s.createPortal)((0,n.jsx)(l.Z,{className:r()(d().component,c,{[d().isOpen]:u}),disabled:!u,children:(0,n.jsx)("div",{ref:t,"aria-labelledby":a,"aria-modal":"true",role:"dialog",children:o})}),g)});u.displayName="Modal",t.Z=u},2789:function(e,t,a){"use strict";a.d(t,{s:function(){return useMutationCartBillingAddress}});var n=a(82066),o=a(68569),r=a(31871),i=a(70850);let useMutationCartBillingAddress=(e,t)=>{let a=(0,n.useQueryClient)(),s=(0,n.useMutation)(async a=>{let n=await o.Z.fetch("en/rest/en/V2/carts/mine/billing-address",{body:JSON.stringify(a),headers:{"Accept-Language":(0,i.D)(t),Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"POST"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationCartBillingAddress",e),e});return n},{onSuccess:async()=>{a.invalidateQueries([r.MJ.CART_PAYMENT_INFORMATION])}});return s}},73208:function(e,t,a){"use strict";a.d(t,{U:function(){return useMutationCartOrder}});var n=a(82066),o=a(68569),r=a(70850);let useMutationCartOrder=(e,t)=>{let a=(0,n.useMutation)(async a=>{let n=await o.Z.fetch("en/rest/en/V2/carts/mine/order",{body:JSON.stringify(a),headers:{"Accept-Language":(0,r.D)(t),Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"PUT"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationCartOrder",e),e});return n},{onError:async e=>e});return a}},2475:function(e,t,a){"use strict";a.d(t,{o:function(){return useMutationEmptyCart}});var n=a(82066),o=a(68569),r=a(31871),i=a(70850);let useMutationEmptyCart=(e,t)=>{let a=(0,n.useQueryClient)(),s=(0,n.useMutation)(async a=>{let n=await o.Z.fetch("en/rest/en/V2/carts/mine/empty?onlyDonorProdudcs=".concat(a.onlyDonorProducts),{headers:{"Accept-Language":(0,i.D)(t),Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"GET"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationEmptyCart",e),e});return n},{onSuccess:async()=>{a.invalidateQueries([r.MJ.CART_ITEMS]),a.invalidateQueries([r.MJ.CART_PAYMENT_INFORMATION]),a.invalidateQueries([r.MJ.CART_TOTAL])}});return s}},40367:function(e,t,a){"use strict";a.d(t,{T:function(){return useMutationPlaceOrderReepay}});var n=a(82066),o=a(68569),r=a(70850);let useMutationPlaceOrderReepay=(e,t)=>{let a=(0,n.useMutation)(async a=>{let n=await o.Z.fetch("en/rest/en/V2/order/placeOrderReepay",{body:JSON.stringify(a),headers:{"Accept-Language":(0,r.D)(t),Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"PUT"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationPlaceOrderReepay",e),e});return n},{onError:async e=>e});return a}},12475:function(e,t,a){"use strict";a.d(t,{y:function(){return useMutationRecurringPayment}});var n=a(82066),o=a(68569),r=a(31871);let useMutationRecurringPayment=e=>{let t=(0,n.useQueryClient)(),a=(0,n.useMutation)(async t=>{let a=await o.Z.fetch("en/rest/en/V2/carts/mine/recurring-payment-session",{body:JSON.stringify(t),headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"POST"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useMutationRecurringPayment",e),e});return a},{onError:async e=>e,onSuccess:async()=>{t.invalidateQueries([r.MJ.CART])}});return a}},71517:function(e,t,a){"use strict";a.d(t,{k:function(){return useQueryCartAgreements}});var n=a(82066),o=a(68569),r=a(31871),i=a(70850);let useQueryCartAgreements=(e,t)=>{let a=(0,n.useQuery)([r.MJ.AGREEMENTS,e,t],async()=>{let a=await o.Z.fetch("en/rest/en/V2/carts/mine/agreements",{headers:{"Accept-Language":(0,i.D)(t),Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"GET"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useQueryCartAgreements",e),e});return a},{enabled:!!e,keepPreviousData:!0,staleTime:r.ip});return a}},47482:function(e,t,a){"use strict";a.d(t,{q:function(){return useQueryMyStorage}});var n=a(82066),o=a(68569),r=a(31871),i=a(70850);let useQueryMyStorage=(e,t)=>
1{let a=(0,n.useQuery)([r.MJ.MY_STORAGE,e,t],async()=>{let a=await o.Z.fetch("en/rest/en/V2/storage/mine",{headers:{"Accept-Language":(0,i.D)(t),Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},method:"GET"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useQueryMyStorage",e),e});return a},{enabled:!!e,keepPreviousData:!0,staleTime:r.ip});return a}},62453:function(e,t,a){"use strict";a.d(t,{Q:function(){return useQueryRecurringPayment}});var n=a(82066),o=a(31871),r=a(69599);let useQueryRecurringPayment=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,n.useQuery)([o.MJ.RECURRING_PAYMENT,e],async()=>{let t=await r.Z.fetch("api/magento/recurring-payment",{body:JSON.stringify(e),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok)throw Error("".concat(t.status," - ").concat(t.statusText));return t.json()},{enabled:t,keepPreviousData:!0,staleTime:o.ip})}},24841:function(e,t,a){"use strict";a.d(t,{O:function(){return useQueryValidateOrderReepay}});var n=a(82066),o=a(68569),r=a(31871),i=a(70850);let useQueryValidateOrderReepay=(e,t,a)=>{let s=(0,n.useQuery)([r.MJ.VALIDATE_ORDER_REEPAY,e,t,a],async()=>{let n=await o.Z.fetch("en/rest/en/V2/order/validateAndUpdateOrderReepay/".concat(e.orderId),{headers:{"Accept-Language":(0,i.D)(a),Authorization:"Bearer ".concat(t),"Content-Type":"application/json"},method:"GET"}).then(e=>{if(e.ok)return e.json();throw Error("".concat(e.status," - ").concat(e.statusText))}).catch(e=>{throw console.error("commerce.useQueryValidateOrderReepay",e),e});return n},{enabled:!!t&&!!e.orderId,keepPreviousData:!0,staleTime:r.ip});return s}},71743:function(e,t){"use strict";t.Z={ENABLE_SUBSCRIPTION_MANAGEMENT:!0,ENABLE_USERTOUR:!1}},89785:function(e,t,a){"use strict";a.d(t,{x:function(){return formatLocaleDate}});var n=a(70850);let formatLocaleDate=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{day:"2-digit",month:"2-digit",year:"2-digit"},o=new Date(e);return o.toLocaleDateString((0,n.D)(t),a)}},94533:function(e){e.exports={component:"card_component__5xqy7",imageWrapper:"card_imageWrapper__IQzR2",content:"card_content__mgZe4",topContainer:"card_topContainer__D7bJG",timeContainer:"card_timeContainer__yLMnp",icon:"card_icon__nPyYB",label:"card_label__iNL__",headline:"card_headline__zyD4D",paragraphContainer:"card_paragraphContainer__YXwla",paragraph:"card_paragraph__LipRw",image:"card_image__IQp6W",bottomContainer:"card_bottomContainer__mgZfZ",authorContainer:"card_authorContainer__T57QU",authorImageWrapper:"card_authorImageWrapper__p9LUl",authorImage:"card_authorImage__vWYjo",dateContainer:"card_dateContainer__EDrHJ",divider:"card_divider__H_QNA",readMoreLink:"card_readMoreLink__fkHHr",readMoreIcon:"card_readMoreIcon__VBYl6",isFullBodyTextDisplayed:"card_isFullBodyTextDisplayed__lpOWG"}},91253:function(e){e.exports={component:"date-picker_component__WfV33",input:"date-picker_input__S48bK",inputIcon:"date-picker_inputIcon__t7aBG",calendarIcon:"date-picker_calendarIcon__NPgU_",field:"date-picker_field__u1rNx",overlayHeadline:"date-picker_overlayHeadline__uKJX8",overlayItem:"date-picker_overlayItem__Toumm",overlayClose:"date-picker_overlayClose__1J3iz",datePickerShadowTop:"date-picker_datePickerShadowTop__DcTD6",datePickerShadowBottom:"date-picker_datePickerShadowBottom__Sl1_R",buttonWrapper:"date-picker_buttonWrapper__n6ykz",button:"date-picker_button__NCyrz",hasError:"date-picker_hasError__IIxA9",dateCalendar:"date-picker_dateCalendar__iXZeF",isLocked:"date-picker_isLocked__D1dXX"}},99105:function(e){e.exports={component:"dropdown_component___dO_Q",field:"dropdown_field__MMl0i",isOpen:"dropdown_isOpen__EXPvG",label:"dropdown_label__3sNz5",value:"dropdown_value__S8RGp",icon:"dropdown_icon__LBtGO",listItem:"dropdown_listItem__l_i9_",labelBackground:"dropdown_labelBackground__HNgF8",chevron:"dropdown_chevron__ipRvC",optionWrapper:"dropdown_optionWrapper__ea7jC",isTop:"dropdown_isTop__Irb3a",isBottom:"dropdown_isBottom__USGxV",listContainer:"dropdown_listContainer__6xyeO",isActive:"dropdown_isActive__x3y7j",text:"dropdown_text__iPtSR",error:"dropdown_error__YQXog",hasValue:"dropdown_hasValue__ks0D_",hasError:"dropdown_hasError__QZEhU",isDisabled:"dropdown_isDisabled__WiFMP",lockIcon:"dropdown_lockIcon__GYRIL"}},51813:function(e){e.exports={component:"notifications_component___yiJR",notificationContent:"notifications_notificationContent__c2z5_",leftIcon:"notifications_leftIcon__9PdQY",rightIconClose:"notifications_rightIconClose__VHhsx",footerText:"notifications_footerText__BK30h",isWarning:"notifications_isWarning__RyQLn",text:"notifications_text__Iqz9p",headline:"notifications_headline__3Lw1n",isSuccess:"notifications_isSuccess__vDr7r",isError:"notifications_isError__7cWB0",isGeneral:"notifications_isGeneral__QKyAO"}},15306:function(e){e.exports={component:"text-link_component__v_Qus",icon:"text-link_icon__UkmFX",text:"text-link_text__5qQyv",isDisabled:"text-link_isDisabled__VsTCv"}},46527:function(e){e.exports={component:"tout_component__l3Oco",inner:"tout_inner__sai9_",texts:"tout_texts__bGm2i",hasTextLink:"tout_hasTextLink__OpIQH",headLine:"tout_headLine__n3WBg",link:"tout_link__RtLT0",image:"tout_image__5kESZ",imageContainer:"tout_imageContainer__mcex0",imageInner:"tout_imageInner__od8vm"}},90691:function(e){e.exports={component:"intro-text_component__EB3_H",imageColumn:"intro-text_imageColumn__3rxiK",imageWrapper:"intro-text_imageWrapper__4Z0pQ",image:"intro-text_image__xc3OU",visualContainer:"intro-text_visualContainer__A5axx",visual:"intro-text_visual__SmfXL",textColumn:"intro-text_textColumn__Gi0xy",headline:"intro-text_headline__Bf9DF",content:"intro-text_content__ncuzO"}},16768:function(e){e.exports={component:"user-page-navigation-large_component__TRmby",container:"user-page-navigation-large_container__r__wL",content:"user-page-navigation-large_content__IG_7w",borderRadius:"user-page-navigation-large_borderRadius__sf3UD",box:"user-page-navigation-large_box__mlQ1y",item:"user-page-navigation-large_item__ks2av",navItemLabel:"user-page-navigation-large_navItemLabel__2z935",isHidden:"user-page-navigation-large_isHidden__za4KD",dotMenu:"user-page-navigation-large_dotMenu__H8MX0",dotMenuIcon:"user-page-navigation-large_dotMenuIcon__rhAPp",blue:"user-page-navigation-large_blue__yHS2w",truncateMenu:"user-page-navigation-large_truncateMenu__GKIRW",truncateItem:"user-page-navigation-large_truncateItem__pSmlj",truncateLabel:"user-page-navigation-large_truncateLabel__Kb9uY",active:"user-page-navigation-large_active__sbTqA",dotMenuContainer:"user-page-navigation-large_dotMenuContainer__qf07b"}}
1,52559:function(e){e.exports={component:"user-page-navigation-small_component__sIBAE",contentContainer:"user-page-navigation-small_contentContainer__zd3fn",content:"user-page-navigation-small_content__f4tq9",cardBackground:"user-page-navigation-small_cardBackground___Gy0m",contentItem:"user-page-navigation-small_contentItem__55XWc",contentChevronUp:"user-page-navigation-small_contentChevronUp__xEY7e",isActive:"user-page-navigation-small_isActive__astcu",contentLabel:"user-page-navigation-small_contentLabel__cD4Xq",isOpen:"user-page-navigation-small_isOpen__qg_GD",fadeBackground:"user-page-navigation-small_fadeBackground__rb2rM"}},53328:function(e){e.exports={component:"clinic-table-row-actions_component__a3Usc",actionButton:"clinic-table-row-actions_actionButton__0HO0e",isMobile:"clinic-table-row-actions_isMobile__piE9u",overlay:"clinic-table-row-actions_overlay__rMJ6x",panel:"clinic-table-row-actions_panel__m4Lfi",panelHeader:"clinic-table-row-actions_panelHeader__4Fd_V",closeButton:"clinic-table-row-actions_closeButton__ZttY_"}},43685:function(e){e.exports={component:"treatment-report-row_component__Wqejx",label:"treatment-report-row_label__eua53",cell:"treatment-report-row_cell__jllO7",donor:"treatment-report-row_donor__9_nbh",patient:"treatment-report-row_patient__SFuKs",donorId:"treatment-report-row_donorId__XZ0UF",status:"treatment-report-row_status__XRnyl",statusTag:"treatment-report-row_statusTag__jBwSr",isPurple:"treatment-report-row_isPurple__iSk1E",isGray:"treatment-report-row_isGray__EDSDJ",isYellow:"treatment-report-row_isYellow__sCaQ9",actions:"treatment-report-row_actions__aF2av",actionButton:"treatment-report-row_actionButton__ucdut",actionsMenu:"treatment-report-row_actionsMenu__kLxNF",isOpen:"treatment-report-row_isOpen__0jm1T",isCustomerView:"treatment-report-row_isCustomerView__zCHA1"}},36519:function(e){e.exports={component:"terms-and-conditions_component__HxQYN",closeIcon:"terms-and-conditions_closeIcon__6zkoo",content:"terms-and-conditions_content__JBPcC"}},53800:function(e){e.exports={component:"change-treatment-overlay_component__8858C",overlayContainer:"change-treatment-overlay_overlayContainer__cOZCw",overlayContent:"change-treatment-overlay_overlayContent__VwS_3",hidden:"change-treatment-overlay_hidden__0Ie_Y",container:"change-treatment-overlay_container__xfxXM",headerContainer:"change-treatment-overlay_headerContainer__zOtO_",textContainer:"change-treatment-overlay_textContainer__e9yDY",button:"change-treatment-overlay_button__8oa6P"}},98163:function(e){e.exports={component:"user-cryo-storage-donor-empty-cart-overlay_component__Dt3eu",overlayContainer:"user-cryo-storage-donor-empty-cart-overlay_overlayContainer__BqyFw",overlayContent:"user-cryo-storage-donor-empty-cart-overlay_overlayContent__fJmWg",contentWrapper:"user-cryo-storage-donor-empty-cart-overlay_contentWrapper__wBKHx",content:"user-cryo-storage-donor-empty-cart-overlay_content__Jg_QS",buttons:"user-cryo-storage-donor-empty-cart-overlay_buttons__HG4tL"}},5578:function(e){e.exports={component:"user-cryo-storage-donor-large_component__ps_Vf",table:"user-cryo-storage-donor-large_table__5NqvU",tableDisabled:"user-cryo-storage-donor-large_tableDisabled__q8s8r",tableHeader:"user-cryo-storage-donor-large_tableHeader__RPgn0",emptyStorageContent:"user-cryo-storage-donor-large_emptyStorageContent__6zsbb",tableData:"user-cryo-storage-donor-large_tableData__qWiGM",donorColumn:"user-cryo-storage-donor-large_donorColumn__O4mOy",donorImage:"user-cryo-storage-donor-large_donorImage__LZRu4",donorImageBlur:"user-cryo-storage-donor-large_donorImageBlur__hPkOZ",donorName:"user-cryo-storage-donor-large_donorName__186U5",buttonContainer:"user-cryo-storage-donor-large_buttonContainer__sh80b",button:"user-cryo-storage-donor-large_button__jCDY5",counterContainer:"user-cryo-storage-donor-large_counterContainer__j0meS",toolTipContainer:"user-cryo-storage-donor-large_toolTipContainer__c9kRR",storageTooltipAchor:"user-cryo-storage-donor-large_storageTooltipAchor__RI2BD",isEmptyActiveStorage:"user-cryo-storage-donor-large_isEmptyActiveStorage__z5h1I"}},20264:function(e){e.exports={component:"user-cryo-storage-donor-small_component__sxaIQ",tableDisabled:"user-cryo-storage-donor-small_tableDisabled__ZMpcc",donorWrapper:"user-cryo-storage-donor-small_donorWrapper__0qiSz",headLineContainer:"user-cryo-storage-donor-small_headLineContainer__VxKtb",storageWrapper:"user-cryo-storage-donor-small_storageWrapper__40ckH",emptyStorageContent:"user-cryo-storage-donor-small_emptyStorageContent__LSCzO",textBlock:"user-cryo-storage-donor-small_textBlock__QB_kV",donorName:"user-cryo-storage-donor-small_donorName__uteT9",treatmentCountry:"user-cryo-storage-donor-small_treatmentCountry__DBP5s",table:"user-cryo-storage-donor-small_table__QG3Gc",tableHeader:"user-cryo-storage-donor-small_tableHeader__NqB09",tableData:"user-cryo-storage-donor-small_tableData__9CSo3",counterContainer:"user-cryo-storage-donor-small_counterContainer__Vk6d4",toolTipContainer:"user-cryo-storage-donor-small_toolTipContainer__eiz7I",buttonContainer:"user-cryo-storage-donor-small_buttonContainer__jvnDt",divi
1der:"user-cryo-storage-donor-small_divider__eyMVy",button:"user-cryo-storage-donor-small_button__5aUW5",imageBlock:"user-cryo-storage-donor-small_imageBlock__lcx6P",donorImageBlur:"user-cryo-storage-donor-small_donorImageBlur__H6SFq",storageTooltipAchor:"user-cryo-storage-donor-small_storageTooltipAchor__H9_Qw",toolTipSmall:"user-cryo-storage-donor-small_toolTipSmall__Wsm_9"}},95681:function(e){e.exports={component:"user-cryo-storage-donor_component__mZe3j",extendExpiresColumn:"user-cryo-storage-donor_extendExpiresColumn__tPWIE",donorsOverviewText:"user-cryo-storage-donor_donorsOverviewText__zqAzK",expirationLabel:"user-cryo-storage-donor_expirationLabel__4FEBD",hidden:"user-cryo-storage-donor_hidden__FySXi",expirationGroup:"user-cryo-storage-donor_expirationGroup__eO4HN",isError:"user-cryo-storage-donor_isError__0gXu4",extend:"user-cryo-storage-donor_extend__Wxraw",extendLink:"user-cryo-storage-donor_extendLink__4brRV",textLink:"user-cryo-storage-donor_textLink__Qda7I",headline:"user-cryo-storage-donor_headline__tZVyl"}},91511:function(e){e.exports={component:"user-cryo-storage-subscription-overlay-cancel_component__2EUqx",content:"user-cryo-storage-subscription-overlay-cancel_content__QJoPU",cancelSubscriptionButtonWrapper:"user-cryo-storage-subscription-overlay-cancel_cancelSubscriptionButtonWrapper__CC_Vz",cancelSubscriptionButton:"user-cryo-storage-subscription-overlay-cancel_cancelSubscriptionButton__VChUu",top:"user-cryo-storage-subscription-overlay-cancel_top__1YavG",backButton:"user-cryo-storage-subscription-overlay-cancel_backButton__YQiS2"}},72742:function(e){e.exports={component:"user-cryo-storage-subscription-overlay-change-plan_component__Nt20P",subscriptionPlans:"user-cryo-storage-subscription-overlay-change-plan_subscriptionPlans__uNXbi",headline:"user-cryo-storage-subscription-overlay-change-plan_headline___kB8y",top:"user-cryo-storage-subscription-overlay-change-plan_top__tLbtk",backButton:"user-cryo-storage-subscription-overlay-change-plan_backButton__GY4Sf",changePlanButtonWrapper:"user-cryo-storage-subscription-overlay-change-plan_changePlanButtonWrapper__Slbo9",confirmPlanButtonWrapper:"user-cryo-storage-subscription-overlay-change-plan_confirmPlanButtonWrapper__n7Vd1",changePlanButton:"user-cryo-storage-subscription-overlay-change-plan_changePlanButton__trIjA",confirmPlanButton:"user-cryo-storage-subscription-overlay-change-plan_confirmPlanButton__jHS64",planConfirmation:"user-cryo-storage-subscription-overlay-change-plan_planConfirmation__Lu33u",planOverview:"user-cryo-storage-subscription-overlay-change-plan_planOverview__m_Taj",plan:"user-cryo-storage-subscription-overlay-change-plan_plan__FZFSl",header:"user-cryo-storage-subscription-overlay-change-plan_header__L9B4d",label:"user-cryo-storage-subscription-overlay-change-plan_label__s5DxQ",termsAndConditionsText:"user-cryo-storage-subscription-overlay-change-plan_termsAndConditionsText__Av3T6",termsAndConditionsWrapper:"user-cryo-storage-subscription-overlay-change-plan_termsAndConditionsWrapper__QhOOD",termsHighlightedText:"user-cryo-storage-subscription-overlay-change-plan_termsHighlightedText__R7fpv",successScreen:"user-cryo-storage-subscription-overlay-change-plan_successScreen__B0oXP"}},20152:function(e){e.exports={component:"user-cryo-storage-subscription-overlay-intro_component__kYM0t",optionsWrapper:"user-cryo-storage-subscription-overlay-intro_optionsWrapper__5_Jmp",option:"user-cryo-storage-subscription-overlay-intro_option__7vhnH",changePlan:"user-cryo-storage-subscription-overlay-intro_changePlan__7Wftz",optionButton:"user-cryo-storage-subscription-overlay-intro_optionButton__kGZTT",isDisabled:"user-cryo-storage-subscription-overlay-intro_isDisabled__qoUW_",alertBar:"user-cryo-storage-subscription-overlay-intro_alertBar__oDg1D",icon:"user-cryo-storage-subscription-overlay-intro_icon__G8FrV",buttonText:"user-cryo-storage-subscription-overlay-intro_buttonText__sNBs3",optionTitle:"user-cryo-storage-subscription-overlay-intro_optionTitle__ON3_v",headline:"user-cryo-storage-subscription-overlay-intro_headline__gaJ2L",card:"user-cryo-storage-subscription-overlay-intro_card__PAFnZ",cancelSubscriptionButton:"user-cryo-storage-subscription-overlay-intro_cancelSubscriptionButton__8FFkf"}},40763:function(e){e.exports={component:"user-cryo-storage-subscription-overlay_component__y_bHl",overlayContainer:"user-cryo-storage-subscription-overlay_overlayContainer__2eaGG",closeButton:"user-cryo-storage-subscription-overlay_closeButton__LgWo2",contentWrapper:"user-cryo-storage-subscription-overlay_contentWrapper__edYfe",content:"user-cryo-storage-subscription-overlay_content__bQHg1"}},29352:function(e){e.exports={component:"user-cryo-storage_component__v5Vfo",headline:"user-cryo-storage_headline__Qm7Fc"}},58187:function(e){e.exports={component:"user-details_component__DwvjC"}}
1,2074:function(e){e.exports={component:"action-widget_component__kGd5B",iconContainer:"action-widget_iconContainer__J27P4",textContainer:"action-widget_textContainer__QlemG",hasHeadline:"action-widget_hasHeadline__i9UsY",isBlue:"action-widget_isBlue__vLl4P",isGreen:"action-widget_isGreen__d_Mci",isOrange:"action-widget_isOrange__WoKFj",isPurple:"action-widget_isPurple__6Olus",isFullWidth:"action-widget_isFullWidth__Hi3Z_"}},73445:function(e){e.exports={component:"guidance-card_component__p0b4G",cardHeader:"guidance-card_cardHeader__qovwo",visual:"guidance-card_visual__dMZff",imageContainer:"guidance-card_imageContainer__dQFKX",image:"guidance-card_image__gCS4a",iconCloseContainer:"guidance-card_iconCloseContainer__WEHYy",cardBody:"guidance-card_cardBody__5Jqbf",cardText:"guidance-card_cardText__IRcuz",cardButton:"guidance-card_cardButton__nGbMh",isPrimary:"guidance-card_isPrimary__kvdJ9",isSecondary:"guidance-card_isSecondary__H7idw",isTertiary:"guidance-card_isTertiary__LTVYO",isHidden:"guidance-card_isHidden__ba_Ic"}},16529:function(e){e.exports={component:"storage-card-large_component__BQWg9",table:"storage-card-large_table__kUaZe",tableHeader:"storage-card-large_tableHeader__ZQqaJ",tableData:"storage-card-large_tableData__4cI2c",donorColumn:"storage-card-large_donorColumn__YCJjr",counterContainer:"storage-card-large_counterContainer__CFViS",toolTipContainer:"storage-card-large_toolTipContainer__ee_gz",imageWrapper:"storage-card-large_imageWrapper__PnoYP",donorImageBlur:"storage-card-large_donorImageBlur__MqGJ_",buttonContainer:"storage-card-large_buttonContainer__hEuuB",button:"storage-card-large_button__kIdos",isDisabled:"storage-card-large_isDisabled__YUhLh"}},49937:function(e){e.exports={component:"storage-card-small_component__5rWGg",itemsContainer:"storage-card-small_itemsContainer__KS9xP",item:"storage-card-small_item__Bf0Kn",imageWrapper:"storage-card-small_imageWrapper__jFKKH",header:"storage-card-small_header__c5Oer",donorImageBlur:"storage-card-small_donorImageBlur__uh308",headerTextContainer:"storage-card-small_headerTextContainer__C88YC",treatmentText:"storage-card-small_treatmentText__OW3Lx",divider:"storage-card-small_divider__Eq0II",table:"storage-card-small_table__2OHEA",tableHeader:"storage-card-small_tableHeader__AQsOa",tableData:"storage-card-small_tableData__JjBR_",tableRow:"storage-card-small_tableRow__wAYos",isLastRow:"storage-card-small_isLastRow__Sxidw",counterContainer:"storage-card-small_counterContainer__7JsJd",toolTipContainer:"storage-card-small_toolTipContainer__kXq5A",button:"storage-card-small_button____qGy",isDisabled:"storage-card-small_isDisabled__N1MEw"}},87061:function(e){e.exports={component:"storage-card_component__afzVB",row:"storage-card_row__7_UF_",leftColumn:"storage-card_leftColumn__DUTLt",imageWrapper:"storage-card_imageWrapper__zaekA",image:"storage-card_image__MDwQR",richText:"storage-card_richText__lXrER",rightColumn:"storage-card_rightColumn___4Bhe",button:"storage-card_button__Kfab_"}},66360:function(e){e.exports={component:"user-home_component__daDrL",hidden:"user-home_hidden__cNjsw",firstRow:"user-home_firstRow__cTX13",actionWidgetColumn:"user-home_actionWidgetColumn___mzy3",actionWidget:"user-home_actionWidget__X8QpD",isFullWidth:"user-home_isFullWidth__dx3ha",secondRow:"user-home_secondRow___gHKY",secondRowFirstColumn:"user-home_secondRowFirstColumn__g9kN0",thirdRow:"user-home_thirdRow__c9G3K",fourthRow:"user-home_fourthRow__lxcw9",blogPostsHeadline:"user-home_blogPostsHeadline__MUyxF",blogPostsCardSlider:"user-home_blogPostsCardSlider__mkERa",donorRow:"user-home_donorRow__dTDjp",donorColumn:"user-home_donorColumn__5Ntuw"}},94330:function(e){e.exports={component:"donor-slider_component__MW_VL",hasSidePadding:"donor-slider_hasSidePadding__AtHgf"}},33227:function(e){e.exports={component:"donors-grid__component__5ZFH7",tout:"donors-grid__tout__Vv7cw"}},7125:function(e){e.exports={component:"user-my-donor-empty_component__ylZKV",headline:"user-my-donor-empty_headline__f5bbk",carousel:"user-my-donor-empty_carousel__Bgb68",carouselColumn:"user-my-donor-empty_carouselColumn__Cq3Pj",rightControls:"user-my-donor-empty_rightControls__jyokl",control:"user-my-donor-empty_control__g3evD"}},88545:function(e){e.exports={component:"user-my-donor-overview-subpage_component__2j200",headlineRow:"user-my-donor-overview-subpage_headlineRow__ffasd",headlineColumn:"user-my-donor-overview-subpage_headlineColumn__6HVxh",headline:"user-my-donor-overview-subpage_headline__utymT",donorGridContainer:"user-my-donor-overview-subpage_donorGridContainer__BWg3E"}},77025:function(e){e.exports={component:"user-my-donor-overview_component__UzSRe",donorHeadline:"user-my-donor-overview_donorHeadline__lvJ_G",headlineColumn:"user-my-donor-overview_headlineColumn__sh2GF",headline:"user-my-donor-overview_headline__LV5XV",seeAll:"user-my-donor-overview_seeAll__nLXt3",contentRow:"user-my-donor-overview_contentRow__7nY_2"}},17154:function(e){e.exports={component:"treatment-report-curtain_component__qoNuL",overlayContainer:"treatment-report-curtain_overlayContainer__EccxO",overlayContent:"treatment-report-curtain_overlayContent__MWnL4",container:"treatment-report-curtain_container__EZ934",header:"treatment-report-curtain_header__fStky",headline:"treatment-report-curtain_headline__VzWx_",iconContainer:"treatment-report-curtain_iconContainer__doZpL",content:"treatment-report-curtain_content__jr6uZ",scrollbar:"treatment-report-curtain_
1scrollbar__lA_Ur",buttonContainer:"treatment-report-curtain_buttonContainer__EAV2a",button:"treatment-report-curtain_button__9Qj2X",form:"treatment-report-curtain_form__yoHBa",detailsContainer:"treatment-report-curtain_detailsContainer__YMaGx",valuesWrapper:"treatment-report-curtain_valuesWrapper__KEncw",datePicker:"treatment-report-curtain_datePicker__hGCmY",mapCard:"treatment-report-curtain_mapCard__zB7gJ",isAutomaticReporting:"treatment-report-curtain_isAutomaticReporting__8S3sz",mapImageWrapper:"treatment-report-curtain_mapImageWrapper__igeR1",mapImage:"treatment-report-curtain_mapImage__1eIaf",mapTextBlock:"treatment-report-curtain_mapTextBlock__lo_pw",automaticPregnancyReportingNudge:"treatment-report-curtain_automaticPregnancyReportingNudge__u8roz",mapClinicNameEllipsis:"treatment-report-curtain_mapClinicNameEllipsis__sCI1o",mapFooter:"treatment-report-curtain_mapFooter__sVJTG",sectionHeadline:"treatment-report-curtain_sectionHeadline__Woy_r",sectionWrapper:"treatment-report-curtain_sectionWrapper__HmqiV",radioBoxWrapper:"treatment-report-curtain_radioBoxWrapper__URpNM",isDisabled:"treatment-report-curtain_isDisabled__tv_13",treatmentReportOutcomesWrapper:"treatment-report-curtain_treatmentReportOutcomesWrapper__TP6Px",changeClinicLink:"treatment-report-curtain_changeClinicLink__AeE_0",noClinicWrapper:"treatment-report-curtain_noClinicWrapper__HR6hw",addClinicLink:"treatment-report-curtain_addClinicLink__MGgAe"}},42503:function(e){e.exports={component:"user-treatment-history-overview_component__DgtKE",tabs:"user-treatment-history-overview_tabs__0d_bu",tab:"user-treatment-history-overview_tab___UHy0",isActive:"user-treatment-history-overview_isActive__Ke56E",treatmentsHeader:"user-treatment-history-overview_treatmentsHeader___NTpi",actionsHeader:"user-treatment-history-overview_actionsHeader__K4Wof",noTreatmentHistoryContent:"user-treatment-history-overview_noTreatmentHistoryContent__9Bov7",reportOutcomeButton:"user-treatment-history-overview_reportOutcomeButton__s_JIT",noTreatmentHistoryText:"user-treatment-history-overview_noTreatmentHistoryText__tjl13",noTreatmentVisual:"user-treatment-history-overview_noTreatmentVisual__M_GrO",treatmentsContent:"user-treatment-history-overview_treatmentsContent__B97wh",ctaWrapper:"user-treatment-history-overview_ctaWrapper__AVgzQ",decorativeLine:"user-treatment-history-overview_decorativeLine__jFDVe",orWrapper:"user-treatment-history-overview_orWrapper__GzWyk",link:"user-treatment-history-overview_link__MEOCE"}},31581:function(e){e.exports={component:"user-treatment_component__ca3Qv",headline:"user-treatment_headline__ZfZNc",clinicWrapper:"user-treatment_clinicWrapper__xCtJ5",noClinicContent:"user-treatment_noClinicContent__szIEx",noClinicButtons:"user-treatment_noClinicButtons__OQNl2",addClinicButton:"user-treatment_addClinicButton__TycZ5",contactLink:"user-treatment_contactLink__ttnYJ",mapImageWrapper:"user-treatment_mapImageWrapper__AM7lp",mapImage:"user-treatment_mapImage__83wLf",clinicName:"user-treatment_clinicName__eso6L",changeClinicButton:"user-treatment_changeClinicButton__YYHjB",clinicTop:"user-treatment_clinicTop__Y5JsE",contentRow:"user-treatment_contentRow__GL3ov",imageWrapper:"user-treatment_imageWrapper__I_Mzh",image:"user-treatment_image__8SNi_",contactField:"user-treatment_contactField__gVvwD",contactText:"user-treatment_contactText__63F8w",contactIcon:"user-treatment_contactIcon__kqFEw",contactDetailsWrapper:"user-treatment_contactDetailsWrapper__baD_z",clinicDiscountsWrapper:"user-treatment_clinicDiscountsWrapper___piX6",clinicDiscountsHeader:"user-treatment_clinicDiscountsHeader__aVpSy",button:"user-treatment_button__ACjlu",treatmentsHistory:"user-treatment_treatmentsHistory__pQ1vp",treatmentHistoryColumn:"user-treatment_treatmentHistoryColumn__8RYu1",list:"user-treatment_list__mJNoE",listItem:"user-treatment_listItem__KXVBo",hasTreatmentReporting:"user-treatment_hasTreatmentReporting__rQ6ve",clinicColumn:"user-treatment_clinicColumn__AsMJY",hasClinicDiscounts:"user-treatment_hasClinicDiscounts__Q_U0F"}}
1,73051:function(e){e.exports={component:"modal-container_component__vZLvm",container:"modal-container_container__tzKfW",hidden:"modal-container_hidden__rNFBl",headline:"modal-container_headline__C68dZ",closeButton:"modal-container_closeButton__Zx45W"}},63508:function(e){e.exports={component:"modal_component__gCZRn",isOpen:"modal_isOpen__lLjEy"}}},function(e){e.O(0,[6432,1762,1796,9623,8268,9312,5573,8386,2184,1574,4155,7116,8514,8578,4924,3573,6881,9774,2888,179],function(){return e(e.s=57019)}),_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.