1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7966],{47017:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account",function(){return n(13345)}])},13176:function(e,a,n){"use strict";n.d(a,{L:function(){return r}});var s=n(85893);n(67294);var c=n(79841),l=n(93967),t=n.n(l);let r=e=>{var a;let{address:n,countryName:l,className:r}=e,{t:i}=(0,c.$G)(["account"]),{city:o,country_code:d,firstname:u,middlename:m="",lastname:v,postcode:x,region:h,street:j,telephone:f}=n,b=[u,m,v].filter(e=>!!e).join(" "),p=["".concat(o,","),null!==(a=null==h?void 0:h.region)&&void 0!==a?a:null==h?void 0:h.label,x].filter(e=>!!e).join(" ");return(0,s.jsx)("div",{className:t()("box-info",r),children:(0,s.jsxs)("div",{className:"xs-copy",children:[(0,s.jsx)("div",{className:"font-univers65Bold mb-2",children:b}),null==j?void 0:j.map((e,a)=>(0,s.jsx)("div",{className:t()("street-row"),children:e},"street-".concat(a))),(0,s.jsx)("div",{children:p}),(0,s.jsx)("div",{children:l||d}),(0,s.jsxs)("div",{children:[i("account||account|Tel: "),f]})]})})}},48358:function(e,a,n){"use strict";n.d(a,{n:function(){return j}});var s=n(85893),c=n(67294),l=n(79841),t=n(3727),r=n(12921),i=n.n(r),o=n(26803),d=n(89659),u=n(11163);let m=()=>{let{locale:e}=(0,u.useRouter)(),[a,n]=(0,c.useState)(!1),{mutate:s}=(0,o.mA)({revalidateOnFocus:!1});return{isLoading:a,deleteCustomerAddress:async a=>{n(!0);let c=await (0,d.J)({query:"\n mutation deleteCustomerAddress($addressId: ID!) {\n deleteCustomerAddress(uid: $addressId)\n }\n",variables:{addressId:a},locale:e});return await s(),n(!1),c}}};var v=n(70723),x=n(93967),h=n.n(x);let j=e=>{let{addressId:a}=e,{t:n}=(0,l.$G)(["account"]),{t:r}=(0,l.$G)("common"),{openToast:o}=(0,t.l8)(),{deleteCustomerAddress:d,isLoading:u}=m(),x=(0,c.useRef)(null),j=()=>{var e;null===(e=x.current)||void 0===e||e.close()},f=()=>{var e;null===(e=x.current)||void 0===e||e.showModal()},b=async()=>{j();try{var e;let s=await d(a);(null==s?void 0:s.errors)&&o(n("account||account|Something went wrong. Please try again"),t.pC.Danger),(null==s?void 0:null===(e=s.data)||void 0===e?void 0:e.deleteCustomerAddress)&&o(n("account||removeaddress|Address has been removed."),t.pC.Success)}catch(e){console.warn("error found")}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(v.z,{variant:"tertiary",size:"sm",className:h()(i()["remove-button"],i()["address-button"]),onKeyPress:f,onClick:f,label:u?n("account||removeaddress|Deleting.."):n("account||account|Delete"),children:u?n("account||removeaddress|Deleting.."):n("account||account|Delete")}),(0,s.jsxs)("dialog",{ref:x,className:i().dialog,children:[(0,s.jsx)("p",{children:n("account||removeaddress|Are you sure you want to delete this address?")}),(0,s.jsxs)("div",{className:"flex justify-end gap-4 mt-10",children:[(0,s.jsx)(v.z,{className:h()("flex-grow flex-shrink w-full",i()["dialog-button"]),variant:"primary",onClick:j,label:r("Cancel"),children:r("Cancel")}),(0,s.jsx)(v.z,{className:h()("flex-grow flex-shrink w-full",i()["dialog-button"]),variant:"secondary",onClick:b,label:r("Ok"),children:r("Ok")})]})]})]})}},78669:function(e,a,n){"use strict";n.d(a,{w:function(){return l}});var s=n(5152),c=n.n(s);n(67294);let l=c()(()=>Promise.all([n.e(6561),n.e(4666)]).then(n.bind(n,14666)),{loadableGenerated:{webpack:()=>[14666]}})},13345:function(e,a,n){"use strict";n.r(a),n.d(a,{__N_SSG:function(){return A},default:function(){return D}});var s=n(85893),c=n(13923),l=n(4735),t=n(70835),r=n(13176),i=n(48358),o=n(70723),d=n(26803),u=n(12921),m=n.n(u),v=n(93967),x=n.n(v),h=n(79841),j=n(67294);let f=e=>{let{label:a,id:n,children:c,uid:l}=e,{t}=(0,h.$G)(["account"]),{customer:r}=(0,d.aF)();return(0,s.jsxs)(s.Fragment,{children:[c,!(null==r?void 0:r.isB2B)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"xs-copy",children:a}),n&&(0,s.jsx)(o.z,{variant:"tertiary",size:"sm",className:m()["address-button"],href:"/account/address/edit/".concat(n),label:t("account|Edit"),children:t("account|Edit")}),l&&(0,s.jsx)(i.n,{addressId:l})]})]})},b=e=>{let{addresses:a,countryNameLocale:n}=e,{t:c}=(0,h.$G)(["account"]),l=(0,j.useMemo)(()=>{var e,l,t,i;let[o]=a.filter(e=>null==e?void 0:e.default_shipping),[d]=a.filter(e=>null==e?void 0:e.default_billing),u=o===d;return(0,s.jsxs)(s.Fragment,{children:[d&&(0,s.jsx)(f,{label:u?c("account|Default Addresses"):c("account|Default Billing Addresses"),id:null===(e=d.id)||void 0===e?void 0:e.toString(10),uid:null===(l=d.uid)||void 0===l?void 0:l.toString(),children:(0,s.jsx)(r.L,{className:"md-max:col-span-3",address:d,countryName:n.get(d.country_code)})}),!u&&o&&(0,s.jsx)(f,{label:c("account|Default Shipping Addresses"),id:null===(t=o.id)||void 0===t?void 0:t.toString(10),uid:null===(i=o.uid)||void 0===i?void 0:i.toString(),children:(0,s.jsx)(r.L,{className:"md-max:col-span-3",address:o,countryName:n.get(o.country_code)})}),!d&&!o&&(0,s.jsx)("div",{children:c("account||account|No default addresses")})]})},[a,n,c]);return(0,s.jsx)("div",{className:x()(m()["address-row"],m().address),children:l})};var p=n(41664),g=n.n(p);let N=e=>{let{customer:a,canEditInfo:n=!0}=e,{t:c}=(0,h.$G)(["account"]),{t:l}=(0,h.$G)(["account"]),{firstname:t,lastname:r,email:i,company:o}=a;return(0,s.jsxs)("div",{className:"account-details box-info",children:[(0,s.jsx)("div",{className:"mb-6 small-copy",children:c("account|Contact Information")}),(0,s.jsxs)("div",{className:"py-6 px-16px bg-bg-grey",children:[!!o&&(0,s.jsx)("div",{className:"small-copy",children:o.name}),(0,s.jsx)("div",{className:"small-copy",children:"".concat(t," ").concat(r)}),(0,s.jsx)("div",{className:"small-copy",children:i})]}),n&&(0,s.jsxs)("div",{className:"action-container",children:[(0,s.jsx)(g(),{href:"/account/account-information",legacyBehavior:!0,children:(0,s.jsx)("a",{"aria-label":"".concat(c("account|Edit")," - ").concat(l("ada|Opens in the current Tab")),children:c("account|Edit")})}),(0,s.jsx)(g(),{href:{pathname:"/account/account-information",query:{action:"password"}},"aria-label":"".concat(c("account|Change Password")," - ").concat(l("ada|Opens in the current Tab")),children:c("account|Change Password")})]})]})};var y=n(10941),w=n(96520),k=n(78669);let _=e=>{var a,n;let{initialBlockData:c,blockIdentifier:l}=e,{data:t,error:r}=(0,w.P)({identifier:[l],contentType:"cmsBlock"},{revalidateOnFocus:!1,revalidateOnMount:!0,initialData:c});return t&&t.length&&!r?(0,s.jsx)("div",{className:"account-welcome-message max-w-6xl small-copy",children:(0,s.jsx)(k.w,{html:null===(n=t[0])||void 0===n?void 0:null===(a=n.parsedEntries)||void 0===a?void 0:a.content})}):null};var B=n(91637),C=n(3727),E=n(99711),A=!0;function D(e){var a,n;let{welcomeMessageData:r}=e,{loading:i,customer:o,addresses:u}=(0,d.aF)(),{countryNameLocale:v}=(0,E.FE)(),x=(0,B.d7)(),{LoadingIndicator:j}=(0,C.l8)(),{t:f}=(0,h.$G)(["account"]);return i?(0,s.jsx)("div",{className:"mx-auto max-w-xs",children:(0,s.jsx)(j,{})}):(0,s.jsxs)(c.Z,{children:[(0,s.jsx)(l.u,{title:f("account|My Dashboard")}),!(null==o?void 0:o.isB2B)&&(0,s.jsxs)("div",{className:m()["account-block"],children:[(0,s.jsx)("div",{className:"small-copy pb-6px mb-12px border-light-grey-1 border-b",children:f("account|Hello {{ firstName }} {{ lastName }},",{firstName:null==o?void 0:o.firstname,lastName:null==o?void 0:o.lastname})}),(0,s.jsx)(_,{initialBlockData:r,blockIdentifier:"account-welcome-message"})]}),(0,s.jsxs)("div",{className:m()["account-block"],children:[(0,s.jsx)(t.R,{subHeading:f("account|Account Information")}),(0,s.jsx)("div",{className:m()["account-block-grid"],children:(0,s.jsx)(N,{customer:o,canEditInfo:!1})})]}),(0,s.jsxs)("div",{className:m()["account-block"],children:[(0,s.jsx)(t.R,{link:(null==o?void 0:o.isB2B)?void 0:"/account/address",linkText:(null==o?void 0:o.isB2B)?void 0:f("account|Manage Addresses"),subHeading:f("account|Address Book")}),(0,s.jsx)(b,{addresses:u,countryNameLocale:v})]}),(null==o?void 0:o.isB2B)&&(0,s.jsx)("div",{className:m()["account-block"],children:(0,s.jsxs)("div",{className:m()["support-text"],children:[f("account|B2B support guide")," ",(0,s.jsx)("a",{className:m()["b2b-link"],href:"mailto:".concat(null===(a=x.base.b2b)||void 0===a?void 0:a.supportEmail),target:"_blank",rel:"noreferrer",children:null===(n=x.base.b2b)||void 0===n?void 0:n.supportEmail})]})})]})}D.Protected=!0,D.Layout=y.Z}},function(e){e.O(0,[9709,9350,7729,557,6893,6803,2888,9774,179],function(){return e(e.s=47017)}),_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.