PageSourceSearch

https://jugglelearning.com/assets/AccountSettings-CJjbij6A.js

js jugglelearning.com collected 2026-10-05 19:50:19 UTC 9,254 bytes, 6 lines download raw bytes

1import{n as j,ad as y,t as x,r as o,ae as v,j as t,l as b,v as N,af as F,e as u,B as p,I as B}from"./index-DdsxrQr9.js";import{C as m,a as h,b as A,c as f,d as S}from"./card-BAHm07LT.js";import{C as w}from"./circle-alert-_N6aSf62.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const C=j("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function k(s){const{redirectOnUnauthenticated:n=!1,redirectPath:r=y()}={},c=x.useUtils(),e=x.auth.me.useQuery(void 0,{retry:!1,refetchOnWindowFocus:!1}),a=x.auth.logout.useMutation({onSuccess:()=>{c.auth.me.setData(void 0,null)}}),d=o.useCallback(async()=>{try{await a.mutateAsync()}catch(i){if(i instanceof v&&i.data?.code==="UNAUTHORIZED")return;throw i}finally{c.auth.me.setData(void 0,null),await c.auth.me.invalidate()}},[a,c]),l=o.useMemo(()=>(localStorage.setItem("manus-runtime-user-info",JSON.stringify(e.data)),{user:e.data??null,loading:e.isLoading||a.isPending,error:e.error??a.error??null,isAuthenticated:!!e.data}),[e.data,e.error,e.isLoading,a.error,a.isPending]);return o.useEffect(()=>{n&&(e.isLoading||a.isPending||l.user||typeof window>"u"||window.location.pathname!==r&&(window.location.href=r))},[n,r,a.isPending,e.isLoading,l.user]),{...l,refresh:()=>e.refetch(),logout:d}}const D=N("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function E({className:s,variant:n,...r}){return t.jsx("div",{"data-loc":"client/src/components/ui/alert.tsx:28","data-slot":"alert",role:"alert",className:b(D({variant:n}),s),...r})}function P({className:s,...n}){return t.jsx("div",{"data-loc":"client/src/components/ui/alert.tsx:55","data-slot":"alert-description",className:b("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",s),...n})}function I(){const{user:s,loading:n}=k(),[,r]=F(),[c,e]=o.useState(""),[a,d]=o.useState(!1),l=x.auth.deleteAccount.useMutation({onSuccess:()=>{u.success("Account deleted successfully"),r("/")},onError:g=>{u.error(g.message||"Failed to delete account")}}),i=async()=>{if(!c){u.error("Please enter your email to confirm");return}if(c!==s?.email){u.error("Email does not match your account email");return}await l.mutateAsync({confirmEmail:c})};return n?t.jsx("div",{"data-loc":"client/src/pages/AccountSettings.tsx:44",className:"min-h-screen bg-[#FFF8F0] flex items-center justify-center",children:t.jsx("p",{"data-loc":"client/src/pages/AccountSettings.tsx:45",className:"text-[#1A2B4A] text-lg",children:"Loading..."})}):s?t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:64",className:"min-h-screen bg-[#FFF8F0]",children:[t.jsx("section",{"data-loc":"client/src/pages/AccountSettings.tsx:66",className:"bg-[#1A2B4A] py-16 md:py-20 border-b-8 border-black",children:t.jsx("div",{"data-loc":"client/src/pages/AccountSettings.tsx:67",className:"container",children:t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:68",className:"max-w-4xl mx-auto text-center space-y-6",children:[t.jsxs("h1",{"data-loc":"client/src/pages/AccountSettings.tsx:69",className:"text-4xl md:text-5xl lg:text-6xl font-bold text-white leading-none uppercase",children:["Account",t.jsx("br",{"data-loc":"client/src/pages/AccountSettings.tsx:70"}),t.jsx("span",{"data-loc":"client/src/pages/AccountSettings.tsx:71",className:"inline-block bg-[#FFD166] px-4 py-2 text-[#1A2B4A]",children:"Settings"})]}),t.jsx("p",{"data-loc":"client/src/pages/AccountSettings.tsx:73",className:"text-white/90 text-lg",children:"Manage your account preferences and data"})]})})}),t.jsx("section",{"data-loc":"client/src/pages/AccountSettings.tsx:81",className:"py-16 md:py-20",children:t.jsx("div",{"data-loc":"client/src/pages/AccountSettings.tsx:82",className:"container",children:t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:83",className:"max-w-2xl mx-auto 
6space-y-8",children:[t.jsxs(m,{"data-loc":"client/src/pages/AccountSettings.tsx:86",className:"border-4 border-black shadow-[8px_8px_0_0_rgba(0,0,0,1)]",children:[t.jsx(h,{"data-loc":"client/src/pages/AccountSettings.tsx:87",children:t.jsx(A,{"data-loc":"client/src/pages/AccountSettings.tsx:88",className:"text-2xl font-bold uppercase text-[#1A2B4A]",children:"Account Information"})}),t.jsxs(S,{"data-loc":"client/src/pages/AccountSettings.tsx:92",className:"space-y-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:93",children:[t.jsx("label",{"data-loc":"client/src/pages/AccountSettings.tsx:94",className:"text-sm font-bold text-[#1A2B4A]/70 uppercase",children:"Name"}),t.jsx("p",{"data-loc":"client/src/pages/AccountSettings.tsx:95",className:"text-lg text-[#1A2B4A]",children:s.name})]}),t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:97",children:[t.jsx("label",{"data-loc":"client/src/pages/AccountSettings.tsx:98",className:"text-sm font-bold text-[#1A2B4A]/70 uppercase",children:"Email"}),t.jsx("p",{"data-loc":"client/src/pages/AccountSettings.tsx:99",className:"text-lg text-[#1A2B4A]",children:s.email})]}),t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:101",children:[t.jsx("label",{"data-loc":"client/src/pages/AccountSettings.tsx:102",className:"text-sm font-bold text-[#1A2B4A]/70 uppercase",children:"Role"}),t.jsx("p",{"data-loc":"client/src/pages/AccountSettings.tsx:103",className:"text-lg text-[#1A2B4A] capitalize",children:s.role})]})]})]}),t.jsxs(m,{"data-loc":"client/src/pages/AccountSettings.tsx:109",className:"border-4 border-[#FF6B5B] shadow-[8px_8px_0_0_rgba(255,107,91,0.3)]",children:[t.jsxs(h,{"data-loc":"client/src/pages/AccountSettings.tsx:110",children:[t.jsxs(A,{"data-loc":"client/src/pages/AccountSettings.tsx:111",className:"text-2xl font-bold uppercase text-[#FF6B5B] flex items-center gap-2",children:[t.jsx(C,{"data-loc":"client/src/pages/AccountSettings.tsx:112",className:"h-6 w-6"}),"Delete Account"]}),t.jsx(f,{"data-loc":"client/src/pages/AccountSettings.tsx:115",children:"Permanently delete your account and all associated data"})]}),t.jsxs(S,{"data-loc":"client/src/pages/AccountSettings.tsx:119",className:"space-y-6",children:[t.jsxs(E,{"data-loc":"client/src/pages/AccountSettings.tsx:120",className:"border-2 border-[#FF6B5B] bg-[#FF6B5B]/10",children:[t.jsx(w,{"data-loc":"client/src/pages/AccountSettings.tsx:121",className:"h-4 w-4 text-[#FF6B5B]"}),t.jsxs(P,{"data-loc":"client/src/pages/AccountSettings.tsx:122",className:"text-[#1A2B4A]",children:[t.jsx("strong",{"data-loc":"client/src/pages/AccountSettings.tsx:123",children:"Warning:"})," This action cannot be undone. All your data will be permanently deleted from our servers."]})]}),a?t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:136",className:"space-y-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:137",children:[t.jsx("label",{"data-loc":"client/src/pages/AccountSettings.tsx:138",htmlFor:"confirmEmail",className:"block text-sm font-bold text-[#1A2B4A] mb-2",children:"Confirm your email to proceed:"}),t.jsx(B,{"data-loc":"client/src/pages/AccountSettings.tsx:141",id:"confirmEmail",type:"email",placeholder:s.email||"",value:c,onChange:g=>e(g.target.value),className:"border-2 border-[#FF6B5B]"})]}),t.jsxs("div",{"data-loc":"client/src/pages/AccountSettings.tsx:151",className:"flex gap-3",children:[t.jsx(p,{"data-loc":"client/src/pages/AccountSettings.tsx:152",variant:"outline",className:"flex-1 border-2 border-black",onClick:()=>{d(!1),e("")},disabled:l.isPending,children:"Cancel"}),t.jsx(p,{"data-loc":"client/src/pages/AccountSettings.tsx:163",className:"flex-1 bg-[#FF6B5B] hover:bg-[#FF6B5B]/90 text-white font-bold border-2 border-black",onClick:i,disabled:l.isPending||!c,children:l.isPending?"Deleting...":"Delete My Account"})]})]}):t.jsx(p,{"data-loc":"client/src/pages/AccountSettings.tsx:128",variant:"outline",className:"w-full border-2 border-[#FF6B5B] text-[#FF6B5B] hover:bg-[#FF6B5B] hover:text-white font-bold uppercase",onClick:()=>d(!0),children:"I want to delete my account"})]})]})]})})})]}):t.jsx("div",{"data-loc":"client/src/pages/AccountSettings.tsx:52",className:"min-h-screen bg-[#FFF8F0] flex items-center justify-center",children:t.jsx(m,{"data-loc":"client/src/pages/AccountSettings.tsx:53",className:"max-w-md",children:t.jsxs(h,{"data-loc":"client/src/pages/AccountSettings.tsx:54",children:[t.jsx(A,{"data-loc":"client/src/pages/AccountSettings.tsx:55",children:"Account Settings"}),t.jsx(f,{"data-loc":"client/src/pages/AccountSettings.tsx:56",children:"Please log in to access your account settings"})]})})})}export{I as default};

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.