PageSourceSearch

https://nameberry.com/_next/static/chunks/39iucfztbnptj.js

js nameberry.com collected 2026-09-24 09:22:38 UTC 42,832 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37078,e=>{e.v({Accent:"AccountEmptyState-module-scss-module__YizHTq__Accent",Desc:"AccountEmptyState-module-scss-module__YizHTq__Desc",Hint:"AccountEmptyState-module-scss-module__YizHTq__Hint",Icon:"AccountEmptyState-module-scss-module__YizHTq__Icon",IconWrap:"AccountEmptyState-module-scss-module__YizHTq__IconWrap",Inner:"AccountEmptyState-module-scss-module__YizHTq__Inner",Root:"AccountEmptyState-module-scss-module__YizHTq__Root",Title:"AccountEmptyState-module-scss-module__YizHTq__Title"})},2801,e=>{e.v({LoadingWrap:"FavoritesTab-module-scss-module__k0busW__LoadingWrap",NamesSection:"FavoritesTab-module-scss-module__k0busW__NamesSection",Root:"FavoritesTab-module-scss-module__k0busW__Root",ToolBlock:"FavoritesTab-module-scss-module__k0busW__ToolBlock",ToolGrid:"FavoritesTab-module-scss-module__k0busW__ToolGrid",ToolHint:"FavoritesTab-module-scss-module__k0busW__ToolHint",ToolLabel:"FavoritesTab-module-scss-module__k0busW__ToolLabel"})},86785,e=>{e.v({AccentBar:"ListsTab-module-scss-module__KgODqa__AccentBar",CreateBtn:"ListsTab-module-scss-module__KgODqa__CreateBtn",EmptyCta:"ListsTab-module-scss-module__KgODqa__EmptyCta",EmptyDesc:"ListsTab-module-scss-module__KgODqa__EmptyDesc",EmptyState:"ListsTab-module-scss-module__KgODqa__EmptyState",EmptyTitle:"ListsTab-module-scss-module__KgODqa__EmptyTitle",Eyebrow:"ListsTab-module-scss-module__KgODqa__Eyebrow",Header:"ListsTab-module-scss-module__KgODqa__Header",HeaderCopy:"ListsTab-module-scss-module__KgODqa__HeaderCopy",ListCard:"ListsTab-module-scss-module__KgODqa__ListCard",ListCardBody:"ListsTab-module-scss-module__KgODqa__ListCardBody",ListCardHead:"ListsTab-module-scss-module__KgODqa__ListCardHead",ListCardInner:"ListsTab-module-scss-module__KgODqa__ListCardInner",ListCardMeta:"ListsTab-module-scss-module__KgODqa__ListCardMeta",ListCardTitle:"ListsTab-module-scss-module__KgODqa__ListCardTitle",ListCardTitleWrap:"ListsTab-module-scss-module__KgODqa__ListCardTitleWrap",ListEmpty:"ListsTab-module-scss-module__KgODqa__ListEmpty",ListEmptyLink:"ListsTab-module-scss-module__KgODqa__ListEmptyLink",ListEmptyText:"ListsTab-module-scss-module__KgODqa__ListEmptyText",ListItem:"ListsTab-module-scss-module__KgODqa__ListItem",ListStack:"ListsTab-module-scss-module__KgODqa__ListStack",Page:"ListsTab-module-scss-module__KgODqa__Page",Subtitle:"ListsTab-module-scss-module__KgODqa__Subtitle",Title:"ListsTab-module-scss-module__KgODqa__Title",ViewArrow:"ListsTab-module-scss-module__KgODqa__ViewArrow",ViewBtn:"ListsTab-module-scss-module__KgODqa__ViewBtn"})},24968,e=>{e.v({Connect:"AppTab-module-scss-module__IlwYYq__Connect",ConnectAccent:"AppTab-module-scss-module__IlwYYq__ConnectAccent",ConnectCopy:"AppTab-module-scss-module__IlwYYq__ConnectCopy",ConnectIndex:"AppTab-module-scss-module__IlwYYq__ConnectIndex",ConnectInner:"AppTab-module-scss-module__IlwYYq__ConnectInner",ConnectPhone:"AppTab-module-scss-module__IlwYYq__ConnectPhone",ConnectScreenshot:"AppTab-module-scss-module__IlwYYq__ConnectScreenshot",ConnectStep:"AppTab-module-scss-module__IlwYYq__ConnectStep",ConnectStepDesc:"AppTab-module-scss-module__IlwYYq__ConnectStepDesc",ConnectStepTitle:"AppTab-module-scss-module__IlwYYq__ConnectStepTitle",ConnectSteps:"AppTab-module-scss-module__IlwYYq__ConnectSteps",ConnectVisual:"AppTab-module-scss-module__IlwYYq__ConnectVisual",DownloadAccent:"AppTab-module-scss-module__IlwYYq__DownloadAccent",DownloadCard:"AppTab-module-scss-module__IlwYYq__DownloadCard",DownloadDesc:"AppTab-module-scss-module__IlwYYq__DownloadDesc",DownloadInner:"AppTab-module-scss-module__IlwYYq__DownloadInner",DownloadTitle:"AppTab-module-scss-module__IlwYYq__DownloadTitle",EmptyDesc:"AppTab-module-scss-module__IlwYYq__EmptyDesc",EmptyState:"AppTab-module-scss-module__IlwYYq__EmptyState",EmptyTitle:"AppTab-module-scss-module__IlwYYq__EmptyTitle",Eyebrow:"AppTab-module-scss-module__IlwYYq__Eyebrow",Header:"AppTab-module-scss-module__IlwYYq__Header",LearnMore:"AppTab-module-scss-module__IlwYYq__LearnMore",LoadMoreBtn:"AppTab-module-scss-module__IlwYYq__LoadMoreBtn",LoadMoreWrap:"AppTab-module-scss-module__IlwYYq__LoadMoreWrap",LoadingWrap:"AppTab-module-scss-module__IlwYYq__LoadingWrap",Page:"AppTab-module-scss-module__IlwYYq__Page",PairLabel:"Ap
1pTab-module-scss-module__IlwYYq__PairLabel",PairSelect:"AppTab-module-scss-module__IlwYYq__PairSelect",PairSelectWrap:"AppTab-module-scss-module__IlwYYq__PairSelectWrap",Panel:"AppTab-module-scss-module__IlwYYq__Panel",PanelAccent:"AppTab-module-scss-module__IlwYYq__PanelAccent",PanelBody:"AppTab-module-scss-module__IlwYYq__PanelBody",StoreBadge:"AppTab-module-scss-module__IlwYYq__StoreBadge",StoreBadgeLink:"AppTab-module-scss-module__IlwYYq__StoreBadgeLink",StoreLinks:"AppTab-module-scss-module__IlwYYq__StoreLinks",Subtitle:"AppTab-module-scss-module__IlwYYq__Subtitle",Tab:"AppTab-module-scss-module__IlwYYq__Tab",TabActive:"AppTab-module-scss-module__IlwYYq__TabActive",TabCount:"AppTab-module-scss-module__IlwYYq__TabCount",TabList:"AppTab-module-scss-module__IlwYYq__TabList",Title:"AppTab-module-scss-module__IlwYYq__Title",Toolbar:"AppTab-module-scss-module__IlwYYq__Toolbar"})},35794,e=>{e.v({Avatar:"SettingsTab-module-scss-module__h3yZEW__Avatar",CodeForm:"SettingsTab-module-scss-module__h3yZEW__CodeForm",DangerAccent:"SettingsTab-module-scss-module__h3yZEW__DangerAccent",DangerDesc:"SettingsTab-module-scss-module__h3yZEW__DangerDesc",DangerInner:"SettingsTab-module-scss-module__h3yZEW__DangerInner",DangerSection:"SettingsTab-module-scss-module__h3yZEW__DangerSection",DangerTitle:"SettingsTab-module-scss-module__h3yZEW__DangerTitle",DeleteBtn:"SettingsTab-module-scss-module__h3yZEW__DeleteBtn",Eyebrow:"SettingsTab-module-scss-module__h3yZEW__Eyebrow",Form:"SettingsTab-module-scss-module__h3yZEW__Form",FormActions:"SettingsTab-module-scss-module__h3yZEW__FormActions",Header:"SettingsTab-module-scss-module__h3yZEW__Header",ModalActions:"SettingsTab-module-scss-module__h3yZEW__ModalActions",ModalBackdrop:"SettingsTab-module-scss-module__h3yZEW__ModalBackdrop",ModalCancelBtn:"SettingsTab-module-scss-module__h3yZEW__ModalCancelBtn",ModalConfirmBtn:"SettingsTab-module-scss-module__h3yZEW__ModalConfirmBtn",ModalDesc:"SettingsTab-module-scss-module__h3yZEW__ModalDesc",ModalDialog:"SettingsTab-module-scss-module__h3yZEW__ModalDialog",ModalTitle:"SettingsTab-module-scss-module__h3yZEW__ModalTitle",Page:"SettingsTab-module-scss-module__h3yZEW__Page",PlanBadge:"SettingsTab-module-scss-module__h3yZEW__PlanBadge",PlanBadgeFree:"SettingsTab-module-scss-module__h3yZEW__PlanBadgeFree",PlanCard:"SettingsTab-module-scss-module__h3yZEW__PlanCard",PlanCardPremium:"SettingsTab-module-scss-module__h3yZEW__PlanCardPremium",PlanCta:"SettingsTab-module-scss-module__h3yZEW__PlanCta",PlanCtaPrimary:"SettingsTab-module-scss-module__h3yZEW__PlanCtaPrimary",PlanCtaSecondary:"SettingsTab-module-scss-module__h3yZEW__PlanCtaSecondary",PlanDesc:"SettingsTab-module-scss-module__h3yZEW__PlanDesc",PlanMeta:"SettingsTab-module-scss-module__h3yZEW__PlanMeta",PlanTitle:"SettingsTab-module-scss-module__h3yZEW__PlanTitle",ProfileAccent:"SettingsTab-module-scss-module__h3yZEW__ProfileAccent",ProfileCard:"SettingsTab-module-scss-module__h3yZEW__ProfileCard",ProfileCopy:"SettingsTab-module-scss-module__h3yZEW__ProfileCopy",ProfileEmail:"SettingsTab-module-scss-module__h3yZEW__ProfileEmail",ProfileMain:"SettingsTab-module-scss-module__h3yZEW__ProfileMain",ProfileName:"SettingsTab-module-scss-module__h3yZEW__ProfileName",ResendNotice:"SettingsTab-module-scss-module__h3yZEW__ResendNotice",Section:"SettingsTab-module-scss-module__h3yZEW__Section",SectionAccent:"SettingsTab-module-scss-module__h3yZEW__SectionAccent",SectionDesc:"SettingsTab-module-scss-module__h3yZEW__SectionDesc",SectionInner:"SettingsTab-module-scss-module__h3yZEW__SectionInner",SectionStack:"SettingsTab-module-scss-module__h3yZEW__SectionStack",SectionTitle:"SettingsTab-module-scss-module__h3yZEW__SectionTitle",SignOutBtn:"SettingsTab-module-scss-module__h3yZEW__SignOutBtn",Subtitle:"SettingsTab-module-scss-module__h3yZEW__Subtitle",SuccessDesc:"SettingsTab-module-scss-module__h3yZEW__SuccessDesc",SuccessPanel:"SettingsTab-module-scss-module__h3yZEW__SuccessPanel",SuccessTitle:"SettingsTab-module-scss-module__h3yZEW__SuccessTitle",Title:"SettingsTab-module-scss-module__h3yZEW__Title"})},29634,e=>{"use strict";var a=e.i(91398);e.i(6573);var s=e.i(93594),t=e.i(86533),l=e.i(17563),i=e.i(61681),n=e.i(48998),d=e.i(91788),o=e.i(12008),r=e.i(3828);e.i(545);var c=e.i(83148),u=e.i(42071),m=e.i(91567),_=e.i(56119),p=e.i(46896),h=e.i(5604),f=e.i(51107);e.i(50461);var g=e.i(56206),b=e.i(961),y=e.i(89095),x=e.i(80445),T=e.i(95724),S=e.i(15871),j=e.i(13149),w=e.i(46739);function N(e){return(0,w.default)("MuiDialogContentText",e)}(0,j.default)("MuiDialogContentText",["root"]);let v=(0,x.styled)(S.default,{shouldForwardProp:e=>(0,y.default)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,a)=>a.root})({}),C=d.forwardRef(function(e,s){let t=(0,T.useDefaultProps)({props:e,name:"MuiDialogContentText"}),{children:l,className:i,...n}=t,d=(e=>{let{classes:a}=e,s=(0,b.default)({root:["root"]},N,a);return{...a,...s}})(n);
1return(0,a.jsx)(v,{component:"p",variant:"body1",color:"textSecondary",ref:s,ownerState:n,className:(0,g.default)(d.root,i),...t,classes:d})});var E=e.i(80596),A=e.i(21627),D=e.i(9961),L=e.i(22968),P=e.i(54674),k=e.i(45980),Y=e.i(58495),I=e.i(32752),q=e.i(75840);let W=(0,q.default)((0,a.jsx)("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"}),"FavoriteBorder"),F=(0,q.default)((0,a.jsx)("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2m0 12-4.34 4.34L12 14H3v-2l3-7h9zm4-12h4v12h-4z"}),"ThumbDownOutlined");var B=e.i(37078);let M={favorites:{Icon:W,title:"No favorites yet",description:"Save names you love so we can personalize recommendations and keep them easy to find.",hint:"Search below to add your first favorite"},dislikes:{Icon:F,title:"No dislikes yet",description:"Track names that are not your style so we can filter them out of future suggestions.",hint:"Search below to add a name you want to pass on"}};function R({variant:e}){let s=M[e],{Icon:t}=s;return(0,a.jsxs)("div",{className:B.default.Root,"data-variant":e,children:[(0,a.jsx)("div",{className:B.default.Accent,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:B.default.Inner,children:[(0,a.jsx)("div",{className:B.default.IconWrap,children:(0,a.jsx)(t,{className:B.default.Icon,"aria-hidden":"true"})}),(0,a.jsx)("p",{className:B.default.Title,children:s.title}),(0,a.jsx)("p",{className:B.default.Desc,children:s.description}),(0,a.jsx)("p",{className:B.default.Hint,children:s.hint})]})]})}R.propTypes={variant:m.default.oneOf(["favorites","dislikes"]).isRequired};var O=e.i(4428),Z=e.i(2801);function U({fullFavorites:e,isLoadingFavorites:s,loadFavorites:t}){let[i,n]=(0,d.useState)(!1),[r,u]=(0,d.useState)([]),[m,g]=(0,d.useState)(!1),[b,y]=(0,d.useState)(!1),[x,T]=(0,d.useState)(""),[S,j]=(0,d.useState)(!1),[w,N]=(0,d.useState)(O.DEFAULT_VIEW_MODE),[v,q]=(0,d.useState)(O.DEFAULT_GENDER_FILTER),W=(0,d.useMemo)(()=>{if(v===O.GENDER_FILTER_ALL)return e;let a=v===O.GENDER_FILTER_BOYS?"M":"F";return e.filter(e=>e.gender===a)},[e,v]),{hasActiveSubscription:F}=(0,I.usePremium)(),{favorites:B,addToFavorites:M,selectedNames:H,enterExtendMode:K,exitExtendMode:$}=(0,c.useUserData)(),G=async e=>{if(e){n(!0);try{let a=e.id||e.name_id;if(!a)return void console.error("No name ID found:",e);await M(a),await t({silent:!0})}catch(e){console.error("Error adding favorite:",e)}finally{n(!1)}}},V=async()=>{if(!e||0===e.length){T("Add at least one favorite name to get recommendations"),j(!0);return}g(!0);try{let a=e.map(e=>e.id||e.name_id),s=await (0,Y.extendFavorites)(a,10);if(s?.recommendations){let e=s.recommendations.map(e=>e.name);u(e),K(),y(!0)}}catch(e){console.error("Error getting recommendations:",e),T(e.response?.data?.message||"Failed to get recommendations. Please try again."),j(!0)}finally{g(!1)}},z=async()=>{if(0===H.length){T("Please select at least one name to add"),j(!0);return}n(!0);try{let e=r.filter(e=>{let a=e.id||e.name_id,s=String(a);return H.some(e=>String(e)===s)});await Promise.all(e.map(async e=>{let a=e.id||e.name_id;await M(a)})),$(),y(!1),u([]),await t({silent:!0})}catch(e){console.error("Error adding selected names:",e),T(e.response?.data?.message||"Failed to add names. Please try again."),j(!0)}finally{n(!1)}},X=()=>{j(!1)};return((0,d.useEffect)(()=>{!B||b||i||t({silent:!0})},[B]),s&&0===e.length)?(0,a.jsx)("div",{className:Z.default.LoadingWrap,children:(0,a.jsx)(o.default,{})}):(0,a.jsxs)("div",{className:Z.default.Root,children:[F&&(0,a.jsxs)(a.Fragment,{children:[e&&e.length>0&&(0,a.jsxs)("div",{className:Z.default.NamesSection,children:[(0,a.jsx)(O.default,{onViewModeChange:e=>{N(e)},onSortByChange:()=>{},onGenderFilterChange:e=>{q(e)},initialViewMode:w,initialGenderFilter:v,hideRecommend:!0,hideSortByControls:!0,currentNames:W,nameCount:W.length}),(0,a.jsx)(D.default,{names:W,viewMode:w,hideAds:!0})]}),(!e||0===e.length)&&(0,a.jsx)(R,{variant:"favorites"}),(0,a.jsxs)("div",{className:Z.default.ToolGrid,children:[(0,a.jsxs)("div",{className:Z.default.ToolBlock,children:[(0,a.jsx)("p",{className:Z.default.ToolLabel,children:"Add names"}),(0,a.jsx)(P.default,{onSelect:G,disabled:i,submitting:i})]}),(0,a.jsxs)("div",{className:Z.default.ToolBlock,children:[(0,a.jsx)("p",{className:Z.default.ToolLabel,children:"Recommendations"}),(0,a.jsx)(k.default,{type:"button",fullWidth:!0,onClick:V,disabled:m||i||!e||0===e.length,children:m?"Loading...":"Recommend More Names"}),(0,a.jsx)("p",{className:Z.default.ToolHint,children:"Get name suggestions based on Nameberry's name graph"})]})]})]}),!F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D.default,{names:B,hideAds:!0,showAllNames:!0}),(0,a.jsx)(L.default,{message:"Upgrade to add or remove favorite names whenever inspiration strikes.",buttonText:"Unlock Favorites",placement:"favorites"})]}),b&&(0,a.jsx)(l.Box,{sx:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,padding:"20px"},role:"dialog","aria-modal":"true","aria-labelledby":"recommendations-modal-title",children:(0,a.jsxs)(l.Box,{sx:{backgroundColor:"white",borderRadius:"8px",maxWidth:"900px",maxHeight:"80vh",width:"100%",overflow:"auto",padding:"30px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)"},children:[(0,a.jsx)(_.Typography,{variant:"h4",id:"recommendations-modal-title",gutterBottom:!0,children:"Recommended Names"}),(0,a.jsx)(_.Typography,{sx:{pb:2},children:"Select the names you want to add to your favorites"}),r.length>0&&(0,a.jsx)(D.default,{names:r,hideAds:!0}),(0,a.jsxs)(l.Box,{sx:{textAlign:"center",mt:4,gap:2,display:"flex",justifyContent:"center",flexWrap:"wrap"}
1,children:[(0,a.jsx)(k.default,{onClick:z,disabled:i||0===H.length,children:i?"Adding...":`Add Selected (${H.length})`}),(0,a.jsx)(k.default,{variant:"secondary",onClick:()=>{$(),y(!1)},disabled:i,children:"Cancel"})]})]})}),(0,a.jsxs)(p.Dialog,{open:S,onClose:X,children:[(0,a.jsx)(h.DialogTitle,{children:"Error"}),(0,a.jsx)(f.DialogContent,{children:(0,a.jsx)(C,{children:x})}),(0,a.jsx)(E.DialogActions,{children:(0,a.jsx)(A.Button,{onClick:X,autoFocus:!0,children:"OK"})})]})]})}function H({fullDislikes:e,isLoadingDislikes:s,loadDislikes:t}){let[l,i]=(0,d.useState)(!1),[n,r]=(0,d.useState)(O.DEFAULT_VIEW_MODE),[u,m]=(0,d.useState)(O.DEFAULT_GENDER_FILTER),{hasActiveSubscription:_}=(0,I.usePremium)(),{dislikes:p,addToDislikes:h}=(0,c.useUserData)(),f=(0,d.useMemo)(()=>{if(u===O.GENDER_FILTER_ALL)return e;let a=u===O.GENDER_FILTER_BOYS?"M":"F";return e.filter(e=>e.gender===a)},[e,u]),g=async e=>{if(e){i(!0);try{let a=e.id||e.name_id;if(!a)return void console.error("No name ID found:",e);await h(a),await t()}catch(e){console.error("Error adding dislike:",e)}finally{i(!1)}}};return((0,d.useEffect)(()=>{p&&t()},[p]),s)?(0,a.jsx)("div",{className:Z.default.LoadingWrap,children:(0,a.jsx)(o.default,{})}):(0,a.jsxs)("div",{className:Z.default.Root,children:[_&&(0,a.jsxs)(a.Fragment,{children:[e&&e.length>0&&(0,a.jsxs)("div",{className:Z.default.NamesSection,children:[(0,a.jsx)(O.default,{onViewModeChange:r,onSortByChange:()=>{},onGenderFilterChange:m,initialViewMode:n,initialGenderFilter:u,hideRecommend:!0,hideSortByControls:!0,currentNames:f,nameCount:f.length}),(0,a.jsx)(D.default,{names:f,viewMode:n,hideAds:!0})]}),(!e||0===e.length)&&(0,a.jsx)(R,{variant:"dislikes"}),(0,a.jsx)("div",{className:Z.default.ToolGrid,children:(0,a.jsxs)("div",{className:Z.default.ToolBlock,children:[(0,a.jsx)("p",{className:Z.default.ToolLabel,children:"Add names"}),(0,a.jsx)(P.default,{onSelect:g,disabled:l,submitting:l})]})})]}),!_&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D.default,{names:p,hideAds:!0,showAllNames:!0}),(0,a.jsx)(L.default,{message:"Upgrade to add or remove disliked names whenever inspiration strikes.",buttonText:"Unlock Dislikes",placement:"dislikes"})]})]})}U.propTypes={fullFavorites:m.default.arrayOf(m.default.shape({id:m.default.number,name_id:m.default.number,name:m.default.string,gender:m.default.string})).isRequired,isLoadingFavorites:m.default.bool.isRequired,loadFavorites:m.default.func.isRequired},H.propTypes={fullDislikes:m.default.arrayOf(m.default.shape({id:m.default.number,name_id:m.default.number,name:m.default.string,gender:m.default.string})).isRequired,isLoadingDislikes:m.default.bool.isRequired,loadDislikes:m.default.func.isRequired};var K=e.i(15757),$=e.i(86785);function G(){let e=(0,r.useRouter)(),{hasActiveSubscription:s}=(0,I.usePremium)(),{openModal:t}=(0,K.useUpgradeModal)(),{userLists:l}=(0,c.useUserData)(),i=[...l||[]].sort((e,a)=>a.id-e.id),n=a=>{a.preventDefault(),a.stopPropagation(),s?e.push("/account/userlist/new"):t({placement:"create_list"})},d=a=>s=>{s.preventDefault(),s.stopPropagation(),e.push(`/account/userlist/${a}`)};return(0,a.jsxs)("div",{className:$.default.Page,children:[(0,a.jsxs)("header",{className:$.default.Header,children:[(0,a.jsxs)("div",{className:$.default.HeaderCopy,children:[(0,a.jsx)("p",{className:$.default.Eyebrow,children:"Your collections"}),(0,a.jsxs)("h2",{className:$.default.Title,children:["My ",(0,a.jsx)("em",{children:"lists"})]}),(0,a.jsx)("p",{className:$.default.Subtitle,children:"Save names you love and keep shortlists organized for every style, vibe, or family member."})]}),(0,a.jsx)("button",{type:"button",className:$.default.CreateBtn,onClick:n,children:"Create new list"})]}),0===i.length?(0,a.jsxs)("div",{className:$.default.EmptyState,children:[(0,a.jsx)("p",{className:$.default.EmptyTitle,children:"No lists yet"}),(0,a.jsx)("p",{className:$.default.EmptyDesc,children:"Start a list to collect names from anywhere on Nameberry — then come back here to compare and refine."}),(0,a.jsx)("button",{type:"button",className:$.default.EmptyCta,onClick:n,children:"Create your first list"})]}):(0,a.jsx)("ul",{className:$.default.ListStack,children:i.map(e=>{let s=e?.names?.length||0,t=(0,Y.transformUserListNames)((e?.names||[]).slice(0,8));return(0,a.jsx)("li",{className:$.default.ListItem,children:(0,a.jsxs)("article",{className:$.default.List
1Card,children:[(0,a.jsx)("div",{className:$.default.AccentBar,"aria-hidden":!0}),(0,a.jsxs)("div",{className:$.default.ListCardInner,children:[(0,a.jsxs)("div",{className:$.default.ListCardHead,children:[(0,a.jsxs)("div",{className:$.default.ListCardTitleWrap,children:[(0,a.jsx)("h3",{className:$.default.ListCardTitle,children:e.name}),(0,a.jsxs)("p",{className:$.default.ListCardMeta,children:[1===s?"1 name":`${s} names`,s>8&&" · showing 8"]})]}),(0,a.jsxs)("button",{type:"button",className:$.default.ViewBtn,onClick:d(e.id),children:["View full list",(0,a.jsx)("span",{className:$.default.ViewArrow,"aria-hidden":!0,children:"→"})]})]}),(0,a.jsx)("div",{className:$.default.ListCardBody,children:s>0?(0,a.jsx)(D.default,{names:t,hideAds:!0}):(0,a.jsxs)("div",{className:$.default.ListEmpty,children:[(0,a.jsx)("p",{className:$.default.ListEmptyText,children:"No names saved yet"}),(0,a.jsx)("button",{type:"button",className:$.default.ListEmptyLink,onClick:d(e.id),children:"Add names to this list"})]})})]})]})},e.id)})})]})}var V=e.i(41158);e.i(76237);var z=e.i(68270),X=e.i(86223),J=e.i(24968);function Q(e){return"boys"===e?"M":"girls"===e?"F":null}let ee=[{id:"matches",label:"Matches"},{id:"likes",label:"Likes"},{id:"dislikes",label:"Passes"}],ea={matches:{title:"No matches yet",desc:"Keep swiping with your partner in the app — names you both love will show up here."},likes:{title:"No likes yet",desc:"Names you swipe right on in the app will appear in this list."},dislikes:{title:"No passes yet",desc:"Names you pass on in the app will be collected here."}},es=[{index:"01",title:"Download the app",desc:"Nameberry is free on iPhone and Android. Get it from the App Store or Google Play."},{index:"02",title:"Sign in with this account",desc:"Use the same email and password you use here so your likes, passes, and matches stay in sync."},{index:"03",title:"Swipe with your partner",desc:"Invite them, swipe on your own phones, and names you both love land in this tab."}];function et({placement:e}){return(0,a.jsxs)("div",{className:J.default.StoreLinks,children:[(0,a.jsx)("a",{href:z.APP_STORE_URL,target:"_blank",rel:"noopener noreferrer",className:J.default.StoreBadgeLink,onClick:()=>{(0,X.trackEvent)("account_app_click",{component:"AppTab",action:"app_store_click",placement:e,destination:z.APP_STORE_URL})},children:(0,a.jsx)("img",{src:z.APP_STORE_BADGE_SRC,alt:"Download on the App Store",className:J.default.StoreBadge})}),(0,a.jsx)("a",{href:z.PLAY_STORE_URL,target:"_blank",rel:"noopener noreferrer",className:J.default.StoreBadgeLink,onClick:()=>{(0,X.trackEvent)("account_app_click",{component:"AppTab",action:"play_store_click",placement:e,destination:z.PLAY_STORE_URL})},children:(0,a.jsx)("img",{src:z.GOOGLE_PLAY_BADGE_SRC,alt:"Get it on Google Play",className:J.default.StoreBadge})})]})}function el(){return(0,a.jsxs)("section",{className:J.default.Connect,"aria-labelledby":"app-connect-title",children:[(0,a.jsx)("div",{className:J.default.ConnectAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:J.default.ConnectInner,children:[(0,a.jsxs)("div",{className:J.default.ConnectCopy,children:[(0,a.jsx)("ol",{className:J.default.ConnectSteps,children:es.map(e=>(0,a.jsxs)("li",{className:J.default.ConnectStep,children:[(0,a.jsx)("span",{className:J.default.ConnectIndex,"aria-hidden":!0,children:e.index}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:J.default.ConnectStepTitle,children:e.title}),(0,a.jsx)("p",{className:J.default.ConnectStepDesc,children:e.desc})]})]},e.index))}),(0,a.jsx)(et,{placement:"connect"}),(0,a.jsx)(V.default,{href:"/app",className:J.default.LearnMore,onClick:()=>{(0,X.trackEvent)("account_app_click",{component:"AppTab",action:"learn_more_click",placement:"connect",destination:"/app"})},children:"Learn more about the app"})]}),(0,a.jsx)("div",{className:J.default.ConnectVisual,"aria-hidden":!0,children:(0,a.jsx)("div",{className:J.default.ConnectPhone,children:(0,a.jsx)("img",{src:"/images/app-screenshots/swipe-screen.png",alt:"",className:J.default.ConnectScreenshot})})})]})]})}function ei({currentUserId:e=null}){let s,[t,l]=(0,d.useState)([]),[n,r]=(0,d.useState)(!1),[c,u]=(0,d.useState)(null),[m,_]=(0,d.useState)([]),[p,h]=(0,d.useState)([]),[f,g]=(0,d.useState)([]),[b,y]=(0,d.useState)("matches"),[x,T]=(0,d.useState)(!1),[S,j]=(0,d.useState)(!0),[w,N]=(0,d.useState)(!0),[v,C]=(0,d.useState)(!0),[E,A]=(0,d.useState)(O.DEFAULT_VIEW_MODE),[L,P]=(0,d.useState)(O.DEFAULT_GENDER_FILTER);(0,d.useEffect)(()=>{(async()=>{try{let e=await i.nbClientApi.get("/pairs"),a=e?.data?.pairs||[],s=await Promise.all(a.map(async e=>{try{let a=await i.nbClientApi.get(`/pairs/${e.id}`);return a?.data?.pair||e}
1catch(a){return console.error(`Error fetching pair ${e.id}:`,a),e}}));l(s),s.length>0&&u(s[0].id)}catch(e){console.error("Error fetching pairs:",e)}finally{r(!0)}})()},[]);let k=async(e=0,a=L)=>{if(c){T(!0);try{let s=`/pairs/${c}/matches?limit=100000&offset=0`,t=Q(a);t&&(s+=`&gender=${t}`);let l=await i.nbClientApi.get(s),n=l?.data?.matches||[];_(a=>0===e?n:[...a,...n]),j(10===n.length)}catch(e){console.error("Error fetching matches:",e),_([])}finally{T(!1)}}},Y=async(e=0,a=L)=>{if(c){T(!0);try{let s=`/pairs/${c}/swipe_history?limit=100000&offset=0&verdict=like`,t=Q(a);t&&(s+=`&gender=${t}`);let l=await i.nbClientApi.get(s),n=l?.data?.swipes||[];h(a=>0===e?n:[...a,...n]),N(10===n.length)}catch(e){console.error("Error fetching likes:",e),h([])}finally{T(!1)}}},I=async(e=0,a=L)=>{if(c){T(!0);try{let s=`/pairs/${c}/swipe_history?limit=100000&offset=0&verdict=dislike`,t=Q(a);t&&(s+=`&gender=${t}`);let l=await i.nbClientApi.get(s),n=l?.data?.swipes||[];g(a=>0===e?n:[...a,...n]),C(10===n.length)}catch(e){console.error("Error fetching dislikes:",e),g([])}finally{T(!1)}}};(0,d.useEffect)(()=>{c&&(k(),Y(),I())},[c]);let q={matches:m.length,likes:p.length,dislikes:f.length},W=x&&0===m.length&&0===p.length&&0===f.length,F={matches:m,likes:p,dislikes:f}[b]||[],B=F.map(e=>({name:e.name?.name||"",gender:e.name?.gender||"",name_id:e.name?.id||e.name_id,id:e.name?.id||e.name_id,canonical_url:e.name?.canonical_url})),M=ea[b],R={matches:S,likes:w,dislikes:v}[b]&&F.length>0,Z=n&&t.length>0,U=n&&0===t.length;return s=W?(0,a.jsx)("div",{className:J.default.LoadingWrap,children:(0,a.jsx)(o.default,{})}):B.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D.default,{names:B,viewMode:E,hideAds:!0}),R&&(0,a.jsx)("div",{className:J.default.LoadMoreWrap,children:(0,a.jsx)("button",{type:"button",className:J.default.LoadMoreBtn,onClick:()=>{"matches"===b&&S&&!x?k(m.length):"likes"===b&&w&&!x?Y(p.length):"dislikes"===b&&v&&!x&&I(f.length)},disabled:x,children:x?"Loading...":"Load more"})})]}):(0,a.jsxs)("div",{className:J.default.EmptyState,children:[(0,a.jsx)("p",{className:J.default.EmptyTitle,children:M.title}),(0,a.jsx)("p",{className:J.default.EmptyDesc,children:M.desc})]}),(0,a.jsxs)("div",{className:J.default.Page,children:[(0,a.jsxs)("header",{className:J.default.Header,children:[(0,a.jsx)("p",{className:J.default.Eyebrow,children:"Nameberry app"}),(0,a.jsx)("h2",{className:J.default.Title,id:"app-connect-title",children:U?(0,a.jsxs)(a.Fragment,{children:["Connect the ",(0,a.jsx)("em",{children:"app"})," to this account"]}):(0,a.jsxs)(a.Fragment,{children:["Swipe ",(0,a.jsx)("em",{children:"activity"})]})}),(0,a.jsx)("p",{className:J.default.Subtitle,children:U?"Download Nameberry, sign in with the same email you use here, and swipe with your partner. Names you both love will show up in this tab.":"Review matches, likes, and passes from your partner swiping sessions in the Nameberry app."})]}),!n&&(0,a.jsxs)("div",{className:J.default.Panel,children:[(0,a.jsx)("div",{className:J.default.PanelAccent,"aria-hidden":!0}),(0,a.jsx)("div",{className:J.default.PanelBody,children:(0,a.jsx)("div",{className:J.default.LoadingWrap,children:(0,a.jsx)(o.default,{})})})]}),U&&(0,a.jsx)(el,{}),Z&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:J.default.Toolbar,children:[t.length>1&&(0,a.jsxs)("label",{className:J.default.PairSelectWrap,htmlFor:"app-pair-select",children:[(0,a.jsx)("span",{className:J.default.PairLabel,children:"Active pair"}),(0,a.jsx)("select",{id:"app-pair-select","data-testid":"pair-select",className:J.default.PairSelect,value:c||"",onChange:e=>u(e.target.value),children:t.map(s=>(0,a.jsx)("option",{value:s.id,children:function(e,a){if(!e)return"Unknown";if(e.personal)return"myself";let s=e.members||[];if(0===s.length)return e.name?.trim()||"Waiting...";let t=s.find(e=>"active"===e.status&&e.user_id!==a);return t?.user?.username?t.user.username:e.name?.trim()||"Waiting..."}(s,e)},s.id))})]}),(0,a.jsx)("div",{className:J.default.TabList,role:"tablist","aria-label":"Swipe activity","data-testid":"tabs","data-value":b,children:ee.map(e=>{let s=b===e.id;return(0,a.jsxs)("button",{type:"button",role:"tab",id:`app-tab-${e.id}`,"aria-selected":s,"aria-controls":`app-panel-${e.id}`,"data-testid":`tab-${e.id}`,"data-value":e.id,className:`${J.default.Tab} ${s?J.default.TabActive:""}`,onClick:()=>y(e.id),children:[e.label,(0,a.jsx)("span",{className:J.default.TabCount,children:q[e.i
1d]})]},e.id)})})]}),(0,a.jsxs)("section",{className:J.default.Panel,role:"tabpanel",id:`app-panel-${b}`,"aria-labelledby":`app-tab-${b}`,children:[(0,a.jsx)("div",{className:J.default.PanelAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:J.default.PanelBody,children:[(0,a.jsx)(O.default,{onViewModeChange:e=>{A(e)},onSortByChange:()=>{},onGenderFilterChange:e=>{P(e),k(0,e),Y(0,e),I(0,e)},initialViewMode:E,initialGenderFilter:L,hideSortByControls:!0,hideRecommend:!0,currentNames:B,nameCount:F.length}),s]})]})]}),Z&&(0,a.jsxs)("section",{className:J.default.DownloadCard,"aria-label":"Download the app",children:[(0,a.jsx)("div",{className:J.default.DownloadAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:J.default.DownloadInner,children:[(0,a.jsx)("h3",{className:J.default.DownloadTitle,children:"Take it to the app"}),(0,a.jsx)("p",{className:J.default.DownloadDesc,children:"Continue swiping and matching with your partner. Sign in with this same Nameberry account so everything stays in sync."}),(0,a.jsx)(et,{placement:"download_card"}),(0,a.jsx)(V.default,{href:"/app",className:J.default.LearnMore,onClick:()=>{(0,X.trackEvent)("account_app_click",{component:"AppTab",action:"learn_more_click",placement:"download_card",destination:"/app"})},children:"Learn more about the app"})]})]})]})}et.propTypes={placement:m.default.string.isRequired},ei.propTypes={currentUserId:m.default.number};var en=e.i(46810),ed=e.i(95197),eo=e.i(79404),er=e.i(83745),ec=e.i(78166),eu=e.i(35794);function em(e,a){let s=e[a];return s?Array.isArray(s)?s[0]:s:""}function e_({user:e}){let[s,l]=(0,d.useState)(e?.email||""),[n,o]=(0,d.useState)({}),[r,c]=(0,d.useState)(!1),[u,m]=(0,d.useState)(!1),[_,p]=(0,d.useState)(),[h,f]=(0,d.useState)(),[g,b]=(0,d.useState)(!1),[y,x]=(0,d.useState)(!1),[T,S]=(0,d.useState)(""),[j,w]=(0,d.useState)(""),[N,v]=(0,d.useState)(""),[C,E]=(0,d.useState)(!1),[A,D]=(0,d.useState)(!1),{hasActiveSubscription:L}=(0,I.usePremium)(),[P,k]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(!L)return void k(null);let e=!1;return(async()=>{try{let a=await i.nbClientApi.get("/subscription/info");e||k(a?.data?.subscription||null)}catch(e){console.error("Error fetching subscription info:",e)}})(),()=>{e=!0}},[L]);let Y=async e=>{o({}),await i.nbClientApi.post("/auth/update_email",e).then(a=>{a?.data?.result===!0?(S(e.email),w(""),v(""),D(!1),x(!0)):o(a?.data?.error||{})}).catch(()=>{}).then(()=>{c(!1)})},q=async e=>{c(!0),v(""),await i.nbClientApi.post("/auth/me/confirm_email",{confirmation_token:e}).then(e=>{e?.data?.result===!0?(l(T),p("Email updated"),f(`Your email address has been changed to ${T}.`),x(!1),m(!0)):v(e?.data?.error||"Invalid confirmation code.")}).catch(()=>{v("We had an issue confirming your email address. Please try again.")}).then(()=>{c(!1)})},W=async()=>{E(!0),v(""),D(!1),await i.nbClientApi.post("/auth/me/resend_confirmation",{email:T}).then(e=>{e?.data?.result===!0?D(!0):v(e?.data?.error||"Failed to resend confirmation code")}).catch(()=>{v("Failed to resend confirmation code. Please try again.")}).then(()=>{E(!1)})},F=async e=>{o({}),await i.nbClientApi.post("/auth/reset_password",e).then(e=>{e?.data?.result===!0?(p("Success!"),f("Your password has now been reset."),m(!0)):o(e?.data?.error||{})}).catch(()=>{}).then(()=>{c(!1)})},B=async()=>{await i.nbClientApi.delete("/account"),(0,t.signOut)({callbackUrl:"/"})};(0,d.useEffect)(()=>{if(!g)return;let e=e=>{"Escape"===e.key&&b(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]);let M=P?.current_period_end?new Date(P.current_period_end).toLocaleDateString():null,R=P?.is_canceling||P?.cancel_at_period_end===!0||L&&P?.subscription_status==="canceled";return(0,a.jsxs)("div",{className:eu.default.Page,children:[(0,a.jsxs)("header",{className:eu.default.Header,children:[(0,a.jsx)("p",{className:eu.default.Eyebrow,children:"Your account"}),(0,a.jsxs)("h2",{className:eu.default.Title,children:["Account ",(0,a.jsx)("em",{children:"settings"})]}),(0,a.jsx)("p",{className:eu.default.Subtitle,children:"Manage your membership, sign-in details, and account preferences."})]}),u&&(0,a.jsxs)("div",{className:eu.default.SuccessPanel,children:[(0,a.jsx)("h3",{className:eu.default.SuccessTitle,children:_}),(0,a.jsx)("p",{className:eu.default.SuccessDesc,children:h})]}),!u&&y&&(0,a.jsxs)("div",{className:eu.default.SuccessPanel,children:[(0,a.jsx)("h3",{className:eu.default.SuccessTitle,children:"Almost there..."}),(0,a.jsxs)("p",{className:eu.default.SuccessDesc,children:["Enter the 6-digit code we just sent to ",T," to confirm your new email address. Until then, you can keep logging in with your current email."]}),(0,a.jsxs)("form",{className:eu.default.CodeForm,onSubmit:e=>{e.preventDefault(),6===j.length&&q(j)},children:[(0,a.jsx)(en.AuthField,{name:"confirmation_token",label:"Confirmation code",value:j,onChange:e=>{w(e.target.value.replace(/\D/g,"").slice(0,6))},error:N,autoComplete:"one-time-code",inputMode:"numeric",pattern:"[0-9]*",required:!0}),A&&(0,a.jsx)("p",{className:eu.default.ResendNotice,children:"A new confirmation code has been sent."}),(0,a.jsx)("div",{className:eu.default.FormActions,children:(0,a.jsx)(ed.default,{disabled:r||6!==j.length,children:r?"Confirming…":"Confirm email"})}),(0,a.jsxs)("div",{className:er.default.Centered,children:[(0,a.jsx)("p",{className:er.default.Prompt,children:"Didn't receive the code?"}),(0,a.jsx)(eo.default,{onClick:W,disabled:C,children:C?"Sending…":"Resend code"})]})]})]}),!u&&!y&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:eu.default.ProfileCard,"aria-label":"Profile",children:[(0,a.jsx)("div",{className:eu.default.ProfileAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:eu.default.ProfileMain,children:[(0,a.jsx)("div",{className:eu.default.Avatar,"aria-hidden":!0,
1children:(e?.username||e?.email||"?").charAt(0).toUpperCase()}),(0,a.jsxs)("div",{className:eu.default.ProfileCopy,children:[(0,a.jsx)("p",{className:eu.default.ProfileName,children:e?.username||"Nameberry member"}),(0,a.jsx)("p",{className:eu.default.ProfileEmail,children:e?.email})]})]}),(0,a.jsx)("button",{type:"button",className:eu.default.SignOutBtn,onClick:()=>{(0,t.signOut)({callbackUrl:"/"})},children:"Sign out"})]}),(0,a.jsxs)("div",{className:eu.default.SectionStack,children:[(0,a.jsxs)("section",{className:eu.default.Section,"aria-labelledby":"settings-subscription",children:[(0,a.jsx)("div",{className:eu.default.SectionAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:eu.default.SectionInner,children:[(0,a.jsx)("h3",{className:eu.default.SectionTitle,id:"settings-subscription",children:"Subscription"}),L?(0,a.jsxs)("div",{className:`${eu.default.PlanCard} ${eu.default.PlanCardPremium}`,children:[(0,a.jsx)("span",{className:eu.default.PlanBadge,children:"Premium"}),(0,a.jsx)("p",{className:eu.default.PlanTitle,children:"Premium Subscription Active"}),(0,a.jsx)("p",{className:eu.default.PlanDesc,children:"You currently have full access to all premium features."}),M&&R&&(0,a.jsxs)("p",{className:eu.default.PlanMeta,children:["Your subscription will end on ",M]}),M&&!R&&(0,a.jsxs)("p",{className:eu.default.PlanMeta,children:["Your subscription will renew automatically on"," ",M]}),(0,a.jsx)("a",{href:"/subscription/manage",className:`${eu.default.PlanCta} ${eu.default.PlanCtaSecondary}`,children:"Manage Subscription"})]}):(0,a.jsxs)("div",{className:eu.default.PlanCard,children:[(0,a.jsx)("span",{className:`${eu.default.PlanBadge} ${eu.default.PlanBadgeFree}`,children:"Free"}),(0,a.jsx)("p",{className:eu.default.PlanTitle,children:"Free Account"}),(0,a.jsx)("p",{className:eu.default.PlanDesc,children:"Upgrade to unlock all features."}),(0,a.jsx)("a",{href:"/subscribe",className:`${eu.default.PlanCta} ${eu.default.PlanCtaPrimary}`,children:"Upgrade"})]})]})]}),(0,a.jsxs)("section",{className:eu.default.Section,"aria-labelledby":"settings-email",children:[(0,a.jsx)("div",{className:eu.default.SectionAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:eu.default.SectionInner,children:[(0,a.jsx)("h3",{className:eu.default.SectionTitle,id:"settings-email",children:"Update Email Address"}),(0,a.jsx)("p",{className:eu.default.SectionDesc,children:"We'll send a 6-digit confirmation code to your new address before the change takes effect."}),(0,a.jsxs)("form",{className:eu.default.Form,onSubmit:e=>{e.preventDefault(),c(!0);let a=new FormData(e.target);Y((0,ec.formDataToObject)(a))},children:[(0,a.jsx)(en.AuthField,{name:"email",label:"Email",type:"email",value:s,onChange:e=>{l(e.target.value)},error:em(n,"email"),autoComplete:"email"}),(0,a.jsx)("div",{className:eu.default.FormActions,children:(0,a.jsx)(ed.default,{disabled:r,children:"Update Email Address"})})]})]})]}),(0,a.jsxs)("section",{className:eu.default.Section,"aria-labelledby":"settings-password",children:[(0,a.jsx)("div",{className:eu.default.SectionAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:eu.default.SectionInner,children:[(0,a.jsx)("h3",{className:eu.default.SectionTitle,id:"settings-password",children:"Update Password"}),(0,a.jsx)("p",{className:eu.default.SectionDesc,children:"Choose a strong password you haven't used elsewhere."}),(0,a.jsxs)("form",{className:eu.default.Form,onSubmit:e=>{e.preventDefault(),c(!0);let a=new FormData(e.target),s=(0,ec.formDataToObject)(a);s.password!==s.password_confirmation?(o({password:"Passwords don't match"}),c(!1)):F(s)},children:[(0,a.jsx)(en.AuthField,{name:"password",label:"Password",type:"password",error:em(n,"password"),autoComplete:"new-password"}),(0,a.jsx)(en.AuthField,{name:"password_confirmation",label:"Confirm Password",type:"password",error:em(n,"password_confirmation"),autoComplete:"new-password"}),(0,a.jsx)("div",{className:eu.default.FormActions,children:(0,a.jsx)(ed.default,{disabled:r,children:"Update Password"})})]})]})]}),(0,a.jsxs)("section",{className:eu.default.DangerSection,"aria-labelledby":"settings-danger",children:[(0,a.jsx)("div",{className:eu.default.DangerAccent,"aria-hidden":!0}),(0,a.jsxs)("div",{className:eu.default.DangerInner,children:[(0,a.jsx)("h3",{className:eu.default.DangerTitle,id:"settings-danger",children:"Danger Zone"}),(0,a.jsx)("p",{className:eu.default.DangerDesc,children:"Permanently delete your account and all saved lists, ratings, and other user-generated content. This cannot be undone."}),(0,a.jsx)("button",{type:"button",className:eu.default.DeleteBtn,onClick:()=>b(!0),disabled:r,children:"Delete Account"})]})]})]})]}),g&&(0,a.jsx)("div",{className:eu.default.ModalBackdrop,"data-testid":"modal",role:"presentation",onClick:e=>{e.target===e.currentTarget&&b(!1)},children:(0,a.jsxs)("div",{className:eu.default.ModalDialog,role:"dialog","aria-modal":"true","aria-labelledby":"delete-account-title",children:[(0,a.jsx)("h4",{className:eu.default.ModalTitle,id:"delete-account-title",children:"Are you sure you want to delete your account?"}),(0,a.jsx)("p",{className:eu.default.ModalDesc,children:"You will no longer to log into Nameberry and all your user-generated content will be deleted."}),(0,a.jsx)("p",{className:eu.default.ModalDesc,children:"This action cannot be undone."}),(0,a.jsxs)("div",{className:eu.default.ModalActions,children:[(0,a.jsx)("button",{type:"button",className:eu.default.ModalConfirmBtn,onClick:B,children:"Yes, please delete it"}),(0,a.jsx)("button",{type:"button",className:eu.default.ModalCancelBtn,onClick:()=>b(!1),children:"No!"})]})]})})]})}function ep(){return(0,a.jsx)(n.default,{hideAds:!0,hideHeaderSearch:!0,children:(0,a.jsx)(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:320,py:8},children:(0,a.jsx)(o.default,{})})})}e_.propTypes={user:m.default.shape({email:m.default.string,username:m.default.string,subscription_end_date:m.default.string}).isRequired},e.s(["default",0,function(){let{data:e,status:l}=(0,t.useSession)(),o=(0,r.useRouter)(),[m,_]=(0,d.useState)(),[p,h]=(0,d.useState)("favorites"),[f,g]=(0,d.useState)([]),[b,y]=(0,d.useState)(!1),[x,T]=(0,d.useState)([]),[S,j]=(0,d.useState)(!1),{fetchUserLists:w}=(0,c.useUserData)();(0,d.useEffect)(()=>{"authenticated"!==l||(async()=>{let e=await i.nbClientApi.get("/auth/me");_(e?.data?.user)})()},[l]),(0,d.useEffect)(()=>{let{tab:e}=o.query;e&&["favorites","dislikes","lists","app","settings"].includes(e)&&h(e)},[o.query]),(0,d.useEffect)(()=>{"true"===o.query.refresh&&(w(),o.replace("/account",void 0,{shallow:!0}))},[o.query.refresh,w,o]);let N=async({silent:e=!1}={})=>{e||y(!0);try{let e=await i.nbClientApi.post("/user_ratings/detailed",{object_class:"name"}),a=e?.data?.user_ratings,s=a?a.filter(e=>1===e.rating).map(e=>e.rated_obj):[];g(s)}catch(e){console.error("Error fetching favorite names:",e),g([])}finally{e||y(!1)}},v=async()=>{j(!0);try{let e=await i.nbClientApi.post("/user_ratings/detailed",{object_class:"name"}),a=e?.data?.user_ratings,s=a?a.filter(e=>-1===e.rating).map(e=>e.rated_obj):[];T(s)}catch(e){console.error("Error fetching disliked names:",e),T([])}finally{j(!1)}};return((0,d.useEffect)(()=>{"favorites"===p&&"authenticated"===l&&N()},[p,l]),(0,d.useEffect)(()=>{"dislikes"===p&&"authenticated"===l&&v()},[p,l]),"loading"!==l&&("authenticated"!==l||m))?"unauthenticated"!==l&&e?(0,a.jsxs)(n.default,{hideAds:!0,hideHeaderSearch:!0,children:[(0,a.jsx)(u.default,{activeTab:p,onTabChange:(e,a)=>{h(a),o.push(`/account?tab=${a}`,void 0,{shallow:!0})}}
1),"favorites"===p&&(0,a.jsx)(U,{fullFavorites:f,isLoadingFavorites:b,loadFavorites:N}),"dislikes"===p&&(0,a.jsx)(H,{fullDislikes:x,isLoadingDislikes:S,loadDislikes:v}),"lists"===p&&(0,a.jsx)(G,{}),"app"===p&&(0,a.jsx)(ei,{currentUserId:m.id}),"settings"===p&&(0,a.jsx)(e_,{user:m})]}):(0,a.jsx)(s.default,{statusCode:404}):(0,a.jsx)(ep,{})}],29634)},6302,(e,a,s)=>{let t="/account";(window.__NEXT_P=window.__NEXT_P||[]).push([t,()=>e.r(29634)]),a.hot&&a.hot.dispose(function(){window.__NEXT_P.push([t])})}]);

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.