PageSourceSearch

https://najell.com/_next/static/chunks/pages/my-account/details-ce320a8197990822.js

js najell.com collected 2026-10-09 21:43:22 UTC 15,457 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2d1de79e-b605-4b1f-9c01-35870cd1fc61",e._sentryDebugIdIdentifier="sentry-dbid-2d1de79e-b605-4b1f-9c01-35870cd1fc61")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14],{2896:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account/details",function(){return a(9388)}])},9960:function(e,t,a){"use strict";a.d(t,{Z:function(){return elements_Seo}});var l=a(5893);a(7294);var n=a(9008),s=a.n(n),i=a(1163),r=a(6391);let processFallbackTitle=e=>{var t,a,l,n;return null!==(n=null==e?void 0:null===(l=e.translated_slugs)||void 0===l?void 0:null===(a=l.filter(t=>t.lang===e.lang))||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.name)&&void 0!==n?n:e.name},processTitle=e=>{var t,a;return(null===(a=e.content)||void 0===a?void 0:null===(t=a.seo)||void 0===t?void 0:t.title)||"".concat(processFallbackTitle(e)," - ").concat("Najell")},StoryMeta=e=>{var t,a,n,i,r,o,d,c,u,m,f,v,g,h;let{story:x,showTitle:p=!0,showDescription:j=!0}=e,b=processTitle(x),y=null===(a=x.content)||void 0===a?void 0:null===(t=a.seo)||void 0===t?void 0:t.description,N=null===(i=x.content)||void 0===i?void 0:null===(n=i.seo)||void 0===n?void 0:n.og_title,w=null===(o=x.content)||void 0===o?void 0:null===(r=o.seo)||void 0===r?void 0:r.og_description,M=null===(c=x.content)||void 0===c?void 0:null===(d=c.seo)||void 0===d?void 0:d.og_image,Z=null===(m=x.content)||void 0===m?void 0:null===(u=m.seo)||void 0===u?void 0:u.twitter_title,_=null===(v=x.content)||void 0===v?void 0:null===(f=v.seo)||void 0===f?void 0:f.twitter_description,k=null===(h=x.content)||void 0===h?void 0:null===(g=h.seo)||void 0===g?void 0:g.twitter_image;return(0,l.jsxs)(s(),{children:[p&&(0,l.jsx)("title",{children:b}),j&&y&&(0,l.jsx)("meta",{content:y,name:"description"}),N&&(0,l.jsx)("meta",{content:N,property:"og:title"}),w&&(0,l.jsx)("meta",{content:w,property:"og:description"}),M&&(0,l.jsx)("meta",{content:M,property:"og:image"}),Z&&(0,l.jsx)("meta",{content:Z,property:"twitter:title"}),_&&(0,l.jsx)("meta",{content:_,property:"twitter:description"}),k&&(0,l.jsx)("meta",{content:k,property:"twitter:image"})]})},removeTrailingSlash=e=>e&&e.endsWith("/")?e.slice(0,-1):e,handleDefaultLang=e=>"default"===e?r.H:e,processDefaultHrefLangSlug=e=>{let t=removeTrailingSlash(e.default_full_slug);return"".concat("https://najell.com","/").concat(r.H).concat("home"===e.slug?"":"/".concat(t))},processDefaultCanonicalSlug=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=removeTrailingSlash(e.full_slug).replace("".concat(r.H,"/"),"");return"".concat("https://najell.com","/").concat(handleDefaultLang(e.lang)).concat("home"===e.slug?"":"/".concat(a)).concat(t>1?"?page=".concat(t):"")},processTranslatedSlug=function(e,t){var a;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=null==e?void 0:null===(a=e.translated_slugs)||void 0===a?void 0:a.find(e=>e.lang===t);if(!n)return"";let s=removeTrailingSlash(n.path);return"".concat("https://najell.com","/").concat(n.lang).concat("home"===n.path?"":"/".concat(s)).concat(l>1?"?page=".concat(l):"")},generateHrefLangMetaTags=e=>{var t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("link",{href:processDefaultHrefLangSlug(e),hrefLang:"x-default",rel:"alternate"}),null==e?void 0:null===(t=e.translated_slugs)||void 0===t?void 0:t.map(t=>(0,l.jsx)("link",{href:processTranslatedSlug(e,t.lang),hrefLang:t.lang,rel:"alternate"},t.lang))]})},generateCanonicalMetaTag=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=r.H===t?processDefaultCanonicalSlug(e,a):processTranslatedSlug(e,t,a);return n?(0,l.jsx)("link",{href:n,rel:"canonical"}):null};var elements_Seo=e=>{let{title:t,description:a,story:n,showSiteName:r=!0,currentPageQuery:o=1}=e,{locale:d}=(0,i.useRouter)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s(),{children:[t&&(0,l.jsx)("title",{children:"".concat(t).concat(r?" - ".concat("Najell"):"")}),a&&(0,l.jsx)("meta",{content:a,name:"description"}),n&&generateHrefLangMetaTags(n),n&&generateCanonicalMetaTag(n,d,o),(0,l.jsx)("link",{href:"/favicon.ico",rel:"icon"})]}),n&&(0,l.jsx)(StoryMeta,{showDescription:!a,showTitle:!t,story:n})]})}},2486:function(e,t,a){"use strict";var l=a(5893),n=a(6818),s=a(253),i=a(1464),r=a(2916),o=a(1163);a(7294);var d=a(4012);let c=[{href:"/my-account/orders",labelId:"Orders"},{href:"/my-account/details",labelId:"Details"}];t.Z=e=>{let{children:t}=e,{asPath:a}=(0,o.useRouter)(),{customer:u}=(0,n.ON)();return(0,l.jsxs)("div",{className:"my-account-layout mt-8 mb-12 md:mt-12 md:mb-16 lg:mt-16 xl:my-20",children:[(0,l.jsxs)(i.Z,{className:"mb-12 text-center md:mb-16",children:[(0,l.jsxs)(r.Z,{className:"min-h-[60
1px]",type:"h1",children:[null==u?void 0:u.firstName," ",null==u?void 0:u.lastName]}),(0,l.jsx)("ul",{className:"flex flex-wrap justify-center w-full gap-x-5 gap-y-1 whitespace-nowrap",children:c.map(e=>{let{href:t,labelId:n}=e;return(0,l.jsx)("li",{children:(0,l.jsx)(s.Z,{className:a===t?"underline":"",href:t,children:(0,l.jsx)(d.Z,{id:n})})},t)})})]}),(0,l.jsx)("div",{children:t})]})}},9388:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSG:function(){return C},default:function(){return details}});var l=a(5893),n=a(7294),s=a(96),i=a(1481),r=a(9960),o=a(6818),d=a(6733),c=a(8401),u=a(9293),m=a(8720),f=a(1868),v=a(6624),g=a(4763),h=a(2916),x=a(2865),p=a(7031),j=a(7536),b=a(6896),y=a(5918);let handleLogout=async(e,t,a)=>{e(),t(void 0),a(void 0),localStorage.removeItem(y.vL),window.gmf&&window.gmf("update",{customerToken:null})};var N=a(3774),w=a(5374),M=a(7102),Z=a(4515);let useAnonymizeCustomer=e=>{let{checkoutToken:t}=e,anonymizeCustomer=async()=>{let e=await (0,Z.Z)({endpoint:"/anonymize-customer?checkoutToken=".concat(t)});if(!e.success)throw Error("Failed to anonymize customer");return e};return{anonymizeCustomer}};var _=a(4012),partials_DeleteAccountModal=e=>{let{state:t,setState:a}=e,s=(0,b.Z)(),{showNotification:i}=(0,n.useContext)(x.V),{selection:r}=(0,o.yr)(),{setVoyadoCustomer:d,deleteCustomer:c,setCustomerId:u}=(0,p.A$)(),{logout:f}=(0,o.ON)(),{anonymizeCustomer:g}=useAnonymizeCustomer({checkoutToken:null==r?void 0:r.token}),[j,y]=(0,n.useState)(!1),[N,Z]=(0,n.useState)(!1),showErrorMessage=()=>{i({title:s.formatMessage({id:"notification-account-deleted-title-error"}),description:s.formatMessage({id:"notification-account-deleted-description-error"}),badge:"failure"})},handleDeleteAccount=async()=>{y(!0);let e=await c(),t=await g();if(!e.success||!t.success){showErrorMessage(),y(!1);return}Z(!0),y(!1),setTimeout(()=>{handleLogout(f,d,u)},3e3)};return(0,l.jsx)(M.Z,{state:t,setState:a,className:"delete-account-modal !fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-full px-4 !bg-transparent pointer-events-none",opacity:"bg-opacity-50",shadow:"none",children:(0,l.jsxs)("div",{className:"relative bg-white shadow-xl p-4 max-w-xl mx-auto pointer-events-auto",children:[(0,l.jsxs)("div",{className:"".concat(j||N?"opacity-0":""),children:[(0,l.jsxs)("div",{className:"mb-10 relative",children:[(0,l.jsx)(h.Z,{className:"text-xxl font-medium border-b pb-2 mb-4",children:(0,l.jsx)(_.Z,{id:"Cancel Membership"})}),(0,l.jsx)(h.Z,{children:(0,l.jsx)(_.Z,{id:"Are you sure you want to delete your account"})}),(0,l.jsx)(m.Z,{className:"absolute top-0 right-0",variant:"no-style",onClick:()=>a(!1),biggerTouchZone:!0,children:(0,l.jsx)(w.Z,{className:"scale-75"})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(m.Z,{className:"w-1/2",variant:"black",onClick:()=>a(!1),children:(0,l.jsx)(_.Z,{id:"Cancel"})}),(0,l.jsx)(m.Z,{className:"w-1/2 border-red-600 text-red-600",variant:"black-outlined",onClick:handleDeleteAccount,children:(0,l.jsx)(_.Z,{id:"Cancel Membership"})})]})]}),j&&(0,l.jsx)(v.Z,{className:"absolute-center"}),N&&(0,l.jsxs)("div",{className:"text-center absolute-center space-y-4",children:[(0,l.jsx)(h.Z,{className:"text-lg font-medium",children:(0,l.jsx)(_.Z,{id:"notification-account-deleted-title"})}),(0,l.jsx)(h.Z,{className:"",children:(0,l.jsx)(_.Z,{id:"notification-account-deleted-description"})})]})]})})},page_blocks_DetailsPageBlock=()=>{var e,t,a,s,i,r;let y=(0,b.Z)(),{isLoggedIn:w,customer:M,updateDetails:Z,validateEmail:_,validatePhoneNumber:k,logout:C}=(0,o.ON)(),{register:S,handleSubmit:T,formState:{errors:D}}=(0,j.cI)(),{showNotification:L,showUnexpectedErrorNotification:E}=(0,n.useContext)(x.V),{selection:I}=(0,o.yr)(),{setVoyadoCustomer:V,updateCustomer:z,customerId:F,setCustomerId:A,voyadoCustomer:P}=(0,p.A$)(),[H,O]=(0,n.useState)(!1),[q,B]=(0,n.useState)(!1),handleUpdateInformation=async e=>{var t,a,l;O(!0);let n=await z({firstName:e.firstName,lastName:e.lastName,mobilePhone:null==e?void 0:e.phoneNumber,street:null==e?void 0:e.address1,zipCode:null==e?void 0:e.zipCode,city:null==e?void 0:e.city,gender:null==e?void 0:e.gender,countryCode:e.country,preferences:{acceptsEmail:e.emailMarketing,acceptsSms:e.smsMarketing}});if(n&&"errorCode"in n){let e=null===(a=n.validationErrors)||void 0===a?void 0:a.find(e=>"InvalidPhonenumber"===e.validationErrorCode);
1if(e){L({title:y.formatMessage({id:"notification-phone-number-invalid-title"}),description:y.formatMessage({id:"notification-phone-number-invalid-text"}),badge:"failure"}),O(!1);return}E(),O(!1);return}let s=await Z({firstName:e.firstName,lastName:e.lastName,gender:null==e?void 0:e.gender,address1:null==e?void 0:e.address1,address2:null==e?void 0:e.address2,zipCode:null==e?void 0:e.zipCode,city:null==e?void 0:e.city,...(null==e?void 0:e.state)&&{state:e.state},country:null==e?void 0:e.country,phoneNumber:null==e?void 0:e.phoneNumber,newsletter:null==e?void 0:e.emailMarketing});if(F&&(null==I?void 0:null===(t=I.loggedIn)||void 0===t?void 0:t.email)&&await (0,N.Og)({customerId:F,email:null==I?void 0:null===(l=I.loggedIn)||void 0===l?void 0:l.email,firstName:e.firstName,lastName:e.lastName}),O(!1),!s.success){E(),O(!1);return}L({title:y.formatMessage({id:"notification-information-updated-title"}),description:y.formatMessage({id:"notification-information-updated-description"}),badge:"success"})},U=null!==(i=null===(a=I.countries)||void 0===a?void 0:null===(t=a.filter(e=>e.country===(null==M?void 0:M.country)))||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.states)&&void 0!==i?i:[];return(0,o.h_)({shouldBeLoggedIn:!0}),(0,l.jsxs)("main",{className:"details-page-block",children:[(0,l.jsx)(g.Z,{container:!0,className:"space-y-12 max-w-lg mx-auto md:space-y-16",children:w&&P?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("form",{onSubmit:T(handleUpdateInformation),children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.email,errors:D,name:"newEmail",placeholder:y.formatMessage({id:"Email"}),register:S,type:"text",validationSchema:{required:y.formatMessage({id:"Field is required"}),disabled:!0,validate:async e=>await _(e)||y.formatMessage({id:"Email is not valid"})}}),(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.phoneNumber,errors:D,name:"phoneNumber",placeholder:y.formatMessage({id:"Phone number"}),register:S,type:"text",validationSchema:{validate:async e=>!e||await k(e)||y.formatMessage({id:"Phone number is not valid"})}})]}),(0,l.jsxs)("div",{className:"mb-2 flex flex-col justify-between md:flex-row md:space-x-8",children:[(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.firstName,errors:D,name:"firstName",placeholder:y.formatMessage({id:"First name"}),register:S,type:"text",validationSchema:{required:y.formatMessage({id:"Field is required"})}}),(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.lastName,errors:D,name:"lastName",placeholder:y.formatMessage({id:"Last name"}),register:S,type:"text",validationSchema:{required:y.formatMessage({id:"Field is required"})}})]}),(0,l.jsx)("div",{className:"mb-2 flex flex-col justify-between md:flex-row md:space-x-8",children:(0,l.jsxs)(u.Z,{defaultValue:null==M?void 0:M.gender,errors:D,label:y.formatMessage({id:"Gender"}),name:"gender",register:S,children:[(0,l.jsx)("option",{value:"",children:y.formatMessage({id:"Choose"})}),(0,l.jsx)("option",{value:"M",children:y.formatMessage({id:"Male"})}),(0,l.jsx)("option",{value:"F",children:y.formatMessage({id:"Female"})})]})}),(0,l.jsxs)("div",{className:"mb-2 flex flex-col justify-between md:flex-row md:space-x-8",children:[(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.address1,errors:D,name:"address1",placeholder:y.formatMessage({id:"Street address"}),register:S,type:"text"}),(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.address2,errors:D,name:"address2",placeholder:y.formatMessage({id:"Apartment or suite"}),register:S,type:"text"})]}),(0,l.jsxs)("div",{className:"mb-2 flex flex-col justify-between md:flex-row md:space-x-8",children:[(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.zipCode,errors:D,name:"zipCode",placeholder:y.formatMessage({id:"Zip code"}),register:S,type:"text"}),(0,l.jsx)(c.Z,{defaultValue:null==M?void 0:M.city,errors:D,name:"city",placeholder:y.formatMessage({id:"City"}),register:S,type:"text"})]}),(0,l.jsxs)("div",{className:"mb-2 flex flex-col justify-between md:flex-row md:space-x-8",children:[(0,l.jsx)(u.Z,{defaultValue:null==M?void 0:M.country,errors:D,className:"bg-white",label:y.formatMessage({id:"Country"}),name:"country",register:S,children:null===(s=I.countries)||void 0===s?void 0:s.map(e=>(0,l.jsx)("option",{value:e.country,children:e.name},e.country))}),U.length>0&&(0,l.jsxs)(u.Z,{defaultValue:null!==(r=null==M?void 0:M.state)&&void 0!==r?r:void 0,errors:D,className:"bg-white",label:y.formatMessage({id:"State"}),name:"state",register:S,children:[(0,l.jsx)("option",{value:"",children:y.formatMessage({id:"Choose"})}),U.map(e=>(0,l.jsx)("option",{value:e.state,children:e.name},e.state))]})]}),(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(d.Z,{className:"!mb-0",defaultChecked:P.preferences.acceptsEmail,errors:D,name:"emailMarketing",register:S,children:y.formatMessage({id:"Subscribe to newsletter"})})}),(0,l.jsx)("div",{className:"mb-8",children:(0,l.jsx)(d.Z,{defaultChecked:P.preferences.acceptsSms,errors:D,name:"smsMarketing",register:S,children:y.formatMessage({id:"SMS marketing"})})}
1),(0,l.jsx)(f.Z,{isLoading:H,submit:!0,className:"w-full",children:y.formatMessage({id:"Update"})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(h.Z,{className:"mb-3",variant:"lg",children:y.formatMessage({id:"Log out of the account"})}),(0,l.jsx)(m.Z,{onClick:()=>handleLogout(C,V,A),variant:"black-outlined",className:"w-full",children:y.formatMessage({id:"Logout"})})]}),(0,l.jsx)("div",{children:(0,l.jsx)(m.Z,{onClick:()=>B(!0),variant:"underline",className:"w-full border-red-600 text-red-600 text-left",children:y.formatMessage({id:"Cancel Membership"})})})]}):(0,l.jsx)("div",{className:"min-h-[50vh] flex-center",children:(0,l.jsx)(v.Z,{className:"mb-14"})})}),(0,l.jsx)(partials_DeleteAccountModal,{state:q,setState:B})]})},k=a(2486),C=!0,details=e=>{let{global:t}=e,a=(0,i.f0)(t);return(0,l.jsxs)(s.Z,{transparentHeaderMobileProp:!1,transparentHeaderDesktopProp:!1,headerWhiteTextProp:!0,globalContent:null==a?void 0:a.content,story:void 0,children:[(0,l.jsx)(r.Z,{title:"Account - Najell"}),(0,l.jsx)(k.Z,{children:(0,l.jsx)(page_blocks_DetailsPageBlock,{})})]})}}},function(e){e.O(0,[685,96,774,888,179],function(){return e(e.s=2896)}),_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.