1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6937],{5530:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))})},17930:(e,t,r)=>{"use strict";r.d(t,{ToastProvider:()=>u});var a=r(54568),n=r(7620),s=r(26095),l=r(59551),o=r(64682),i=r(19609),c=r(5530);let d=(0,n.createContext)(void 0);function u(e){let{children:t}=e,[r,s]=(0,n.useState)([]),l=(0,n.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e))},[]),o=(0,n.useCallback)(e=>{var t;let r=Math.random().toString(36).substring(2,9),a={...e,id:r};s(e=>[...e,a]);let n=null!=(t=e.duration)?t:5e3;n>0&&setTimeout(()=>{l(r)},n)},[l]),i=(0,n.useCallback)((e,t)=>{o({type:"success",title:e,message:t})},[o]),c=(0,n.useCallback)((e,t)=>{o({type:"error",title:e,message:t,duration:8e3})},[o]),u=(0,n.useCallback)((e,t)=>{o({type:"warning",title:e,message:t,duration:7e3})},[o]),h=(0,n.useCallback)((e,t)=>{o({type:"info",title:e,message:t})},[o]),b=(0,n.useCallback)((e,t)=>{o({type:"celebration",title:e,message:t,duration:1e4})},[o]);return(0,a.jsxs)(d.Provider,{value:{toasts:r,addToast:o,removeToast:l,showSuccess:i,showError:c,showWarning:u,showInfo:h,showCelebration:b},children:[t,(0,a.jsx)(m,{toasts:r,removeToast:l})]})}function m(e){let{toasts:t,removeToast:r}=e;return(0,a.jsx)("div",{className:"fixed top-4 right-4 z-50 space-y-2 max-w-md",children:t.map(e=>(0,a.jsx)(h,{toast:e,onRemove:r},e.id))})}function h(e){let{toast:t,onRemove:r}=e,n=(()=>{switch(t.type){case"success":return{bg:"bg-gradient-to-r from-emerald-900/90 to-green-900/90",border:"border-emerald-700",icon:(0,a.jsx)(s.A,{className:"h-6 w-6 text-emerald-400"})};case"error":return{bg:"bg-gradient-to-r from-red-900/90 to-rose-900/90",border:"border-red-700",icon:(0,a.jsx)(l.A,{className:"h-6 w-6 text-red-400"})};case"warning":return{bg:"bg-gradient-to-r from-yellow-900/90 to-orange-900/90",border:"border-yellow-700",icon:(0,a.jsx)(o.A,{className:"h-6 w-6 text-yellow-400"})};case"info":return{bg:"bg-gradient-to-r from-blue-900/90 to-cyan-900/90",border:"border-blue-700",icon:(0,a.jsx)(i.A,{className:"h-6 w-6 text-blue-400"})};case"celebration":return{bg:"bg-gradient-to-r from-purple-900/90 to-pink-900/90",border:"border-purple-700",icon:(0,a.jsx)("span",{className:"text-2xl",children:"\uD83C\uDF89"})};default:return{bg:"bg-slate-800/90",border:"border-slate-700",icon:(0,a.jsx)(i.A,{className:"h-6 w-6 text-slate-400"})}}})();return(0,a.jsx)("div",{className:"\n ".concat(n.bg," ").concat(n.border,"\n border rounded-lg shadow-lg backdrop-blur-sm\n p-4 min-w-[320px] max-w-md\n animate-slide-in-right\n "),children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:t.icon||n.icon}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-white mb-1",children:t.title}),t.message&&(0,a.jsx)("p",{className:"text-sm text-slate-300",children:t.message})]}),(0,a.jsx)("button",{onClick:()=>r(t.id),className:"flex-shrink-0 text-slate-400 hover:text-white transition-colors",children:(0,a.jsx)(c.A,{className:"h-5 w-5"})})]})})}},19609:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))})},22232:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))})},24560:(e,t,r)=>{"use strict";r.d(t,{D:()=>c,N:()=>d});var a=r(7620),n=(e,t,r,a,n,s,l,o)=>{let i=document.documentElement,c=["light","dark"];function d(t){var r;
1(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&s?n.map(e=>s[e]||e):n;r?(i.classList.remove(...a),i.classList.add(s&&s[t]?s[t]:t)):i.setAttribute(e,t)}),r=t,o&&c.includes(r)&&(i.style.colorScheme=r)}if(a)d(a);else try{let e=localStorage.getItem(t)||r,a=l&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(a)}catch(e){}},s=["light","dark"],l="(prefers-color-scheme: dark)",o=a.createContext(void 0),i={setTheme:e=>{},themes:[]},c=()=>{var e;return null!=(e=a.useContext(o))?e:i},d=e=>a.useContext(o)?a.createElement(a.Fragment,null,e.children):a.createElement(m,{...e}),u=["light","dark"],m=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:n=!0,enableColorScheme:i=!0,storageKey:c="theme",themes:d=u,defaultTheme:m=n?"system":"light",attribute:g="data-theme",value:x,children:v,nonce:w,scriptProps:y}=e,[k,j]=a.useState(()=>b(c,m)),[N,S]=a.useState(()=>"system"===k?f():k),C=x?Object.values(x):d,E=a.useCallback(e=>{let t=e;if(!t)return;"system"===e&&n&&(t=f());let a=x?x[t]:t,l=r?p(w):null,o=document.documentElement,c=e=>{"class"===e?(o.classList.remove(...C),a&&o.classList.add(a)):e.startsWith("data-")&&(a?o.setAttribute(e,a):o.removeAttribute(e))};if(Array.isArray(g)?g.forEach(c):c(g),i){let e=s.includes(m)?m:null,r=s.includes(t)?t:e;o.style.colorScheme=r}null==l||l()},[w]),A=a.useCallback(e=>{let t="function"==typeof e?e(k):e;j(t);try{localStorage.setItem(c,t)}catch(e){}},[k]),T=a.useCallback(e=>{S(f(e)),"system"===k&&n&&!t&&E("system")},[k,t]);a.useEffect(()=>{let e=window.matchMedia(l);return e.addListener(T),T(e),()=>e.removeListener(T)},[T]),a.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?j(e.newValue):A(m))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[A]),a.useEffect(()=>{E(null!=t?t:k)},[t,k]);let M=a.useMemo(()=>({theme:k,setTheme:A,forcedTheme:t,resolvedTheme:"system"===k?N:k,themes:n?[...d,"system"]:d,systemTheme:n?N:void 0}),[k,A,t,N,n,d]);return a.createElement(o.Provider,{value:M},a.createElement(h,{forcedTheme:t,storageKey:c,attribute:g,enableSystem:n,enableColorScheme:i,defaultTheme:m,value:x,themes:d,nonce:w,scriptProps:y}),v)},h=a.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:s,enableSystem:l,enableColorScheme:o,defaultTheme:i,value:c,themes:d,nonce:u,scriptProps:m}=e,h=JSON.stringify([s,r,i,t,d,c,l,o]).slice(1,-1);return a.createElement("script",{...m,suppressHydrationWarning:!0,nonce:"",dangerouslySetInnerHTML:{__html:"(".concat(n.toString(),")(").concat(h,")")}})}),b=(e,t)=>{let r;try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},f=e=>(e||(e=window.matchMedia(l)),e.matches?"dark":"light")},24651:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E,dynamic:()=>S});var a=r(54568),n=r(7620),s=r(27541),l=r(67184);let o=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.05 4.575a1.575 1.575 0 1 0-3.15 0v3m3.15-3v-1.5a1.575 1.575 0 0 1 3.15 0v1.5m-3.15 0 .075 5.925m3.075.75V4.575m0 0a1.575 1.575 0 0 1 3.15 0V15M6.9 7.575a1.575 1.575 0 1 0-3.15 0v8.175a6.75 6.75 0 0 0 6.75 6.75h2.018a5.25 5.25 0 0 0 3.712-1.538l1.732-1.732a5.25 5.25 0 0 0 1.538-3.712l.003-2.024a.668.668 0 0 1 .198-.471 1.575 1.575 0 1 0-2.228-2.228 3.818 3.818 0 0 0-1.12 2.687M6.9 7.575V12m6.27 4.318A4.49 4.49 0 0 1 16.35 15m.002 0h-.002"}))});var i=r(87470),c=r(22232),d=r(30941),u=r(50349),m=r(26095),h=r(24560);let b=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"}))}),p=n.forwardRef(function(e,t){let{title:r,titleId:a,...s}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":a},s),r?n.createElement("title",{id:a},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))});function f(){let{setTheme:e,resolvedTheme:t}
1=(0,h.D)(),[r,s]=(0,n.useState)(!1);if((0,n.useEffect)(()=>s(!0),[]),!r)return(0,a.jsx)("div",{className:"w-9 h-9 rounded-lg",style:{background:"linear-gradient(135deg, var(--success), var(--success))",opacity:.5},"aria-hidden":"true"});let l="dark"===t,o=l?{background:"linear-gradient(135deg, var(--success), var(--success))",color:"var(--primary-foreground)",border:"none",boxShadow:"0 2px 8px rgba(16, 185, 129, 0.3)"}:{background:"transparent",color:"var(--success)",border:"1.5px solid var(--success)",boxShadow:"none"},i=l?"0 4px 12px rgba(16, 185, 129, 0.4)":"0 0 0 3px rgba(5, 150, 105, 0.15)";return(0,a.jsx)("button",{onClick:()=>e(l?"light":"dark"),className:"p-2 rounded-lg transition-all duration-200 hover:scale-105 active:scale-95",style:o,onMouseOver:e=>{e.currentTarget.style.boxShadow=i,l||(e.currentTarget.style.background="rgba(5, 150, 105, 0.08)")},onMouseOut:e=>{e.currentTarget.style.boxShadow=o.boxShadow,l||(e.currentTarget.style.background="transparent")},"aria-label":"Switch to ".concat(l?"light":"dark"," mode"),title:"Switch to ".concat(l?"light":"dark"," mode"),children:l?(0,a.jsx)(b,{className:"w-5 h-5"}):(0,a.jsx)(p,{className:"w-5 h-5"})})}let g=[{id:"welcome",label:"Welcome",Icon:o},{id:"income",label:"Income",Icon:i.A},{id:"debts",label:"Debts",Icon:c.A},{id:"budget",label:"Budget",Icon:d.A},{id:"complete",label:"Complete",Icon:u.A}];function x(){var e;let{state:t,loading:r}=(0,l.z)();if(r||!t)return(0,a.jsx)("div",{className:"w-full py-4",children:(0,a.jsx)("div",{className:"animate-pulse",children:(0,a.jsx)("div",{className:"h-2 rounded-full",style:{backgroundColor:"var(--border)"}})})});let n=g.findIndex(e=>e.id===t.currentStep);return(0,a.jsxs)("div",{className:"w-full py-4",children:[(0,a.jsxs)("div",{className:"md:hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-sm",style:{color:"var(--muted-foreground)"},children:["Step ",n+1," of ",g.length]}),(0,a.jsx)("span",{className:"text-sm font-medium",style:{color:"var(--foreground)"},children:null==(e=g[n])?void 0:e.label})]})}),(0,a.jsx)("div",{className:"flex-shrink-0 ml-4",children:(0,a.jsx)(f,{})})]}),(0,a.jsx)("div",{className:"w-full rounded-full h-2",style:{backgroundColor:"var(--border)"},children:(0,a.jsx)("div",{className:"h-2 rounded-full transition-all duration-500",style:{width:"".concat((n+1)/g.length*100,"%"),background:"var(--progress-gradient-success)"}})})]}),(0,a.jsx)("div",{className:"hidden md:block",children:(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)("div",{className:"flex items-center justify-between",children:g.map((e,r)=>{var s;let l=(null==t||null==(s=t.completedSteps)?void 0:s.includes(e.id))||!1,o=e.id===(null==t?void 0:t.currentStep);return(0,a.jsxs)("div",{className:"flex-1 relative",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("div",{className:"relative z-10 flex items-center justify-center w-12 h-12 rounded-full transition-all duration-300 transform",style:{backgroundColor:l||o?void 0:"transparent",background:l||o?"var(--progress-gradient-success)":void 0,boxShadow:o&&!l?"0 0 0 4px var(--success-light)":l?"0 2px 8px var(--success-light)":void 0,transform:l||o?"scale(1.1)":"scale(1)",border:l||o?"none":"2px solid var(--success)"},children:l?(0,a.jsx)(m.A,{className:"w-6 h-6",style:{color:"white"}}):(0,a.jsx)(e.Icon,{className:"w-6 h-6",style:{color:o?"white":"var(--success)"}})}),(0,a.jsx)("span",{className:"mt-2 text-sm font-medium",style:{color:"var(--muted-foreground)"},children:e.label})]}),r<g.length-1&&(0,a.jsx)("div",{className:"absolute top-6 left-1/2 w-full h-0.5 -translate-y-1/2 transition-all duration-500",style:{width:"calc(100% - 3rem)",left:"calc(50% + 1.5rem)",background:r<n||l?"var(--progress-gradient-success)":"var(--success-light)"}})]},e.id)})})}),(0,a.jsx)("div",{className:"flex-shrink-0 pt-1",children:(0,a.jsx)(f,{})})]})})]})}var v=r(48037);function w(){let{state:e,previousStep:t}=(0,l.z)(),{resolvedTheme:r}
1=(0,h.D)(),[s,o]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{o(!0)},[]),!e||"welcome"===e.currentStep||"complete"===e.currentStep)return null;let i=s&&"dark"===r,c=["welcome","income","debts","budget"],d=c.indexOf(e.currentStep),u=d>0?c[d-1]:"",m={containerBorder:i?"rgba(255, 255, 255, 0.06)":"rgba(0, 0, 0, 0.06)",buttonBg:i?"rgba(255, 255, 255, 0.05)":"rgba(0, 0, 0, 0.03)",buttonBgHover:i?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.06)",buttonBorder:i?"rgba(255, 255, 255, 0.1)":"rgba(0, 0, 0, 0.08)",buttonText:i?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.6)",buttonTextHover:i?"rgba(255, 255, 255, 0.9)":"rgba(0, 0, 0, 0.8)",helpText:i?"rgba(255, 255, 255, 0.4)":"rgba(0, 0, 0, 0.4)"};return(0,a.jsx)("div",{className:"relative z-30 border-t mt-8 transition-colors",style:{borderColor:m.containerBorder},children:(0,a.jsx)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-4",children:(0,a.jsxs)("div",{className:"flex justify-between items-center gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:d>0&&(0,a.jsxs)("button",{onClick:t,className:"flex items-center gap-2 px-4 sm:px-5 py-2.5 rounded-xl transition-all duration-200 text-sm sm:text-base",style:{backgroundColor:m.buttonBg,color:m.buttonText,border:"1px solid ".concat(m.buttonBorder)},onMouseOver:e=>{e.currentTarget.style.backgroundColor=m.buttonBgHover,e.currentTarget.style.color=m.buttonTextHover},onMouseOut:e=>{e.currentTarget.style.backgroundColor=m.buttonBg,e.currentTarget.style.color=m.buttonText},children:[(0,a.jsx)(v.A,{className:"h-4 w-4 flex-shrink-0"}),(0,a.jsxs)("span",{className:"whitespace-nowrap",children:["Back to ",{welcome:"Welcome",income:"Income",debts:"Debts",budget:"Budget"}[u]]})]})}),(0,a.jsx)("div",{className:"flex-1 text-center hidden md:block",children:(0,a.jsx)("p",{className:"text-sm",style:{color:m.helpText},children:"Review and edit any step before completing"})}),(0,a.jsx)("div",{className:"flex-1"})]})})})}var y=r(72203),k=r(17930),j=r(93558),N=r(94063);let S="force-dynamic";function C(e){let{children:t}=e,{user:r,loading:l}=(0,y.A)(),o=(0,s.useRouter)(),[i,c]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{(0,N.Xb)()&&((0,N.Vg)(),window.location.href="/download-app")},[]),(0,n.useEffect)(()=>{!l&&(c(!0),r?document.cookie.includes("onboarding_complete=true")&&o.replace("/home"):o.replace("/login?reason=session_expired"))},[l,r,o]),l||!i)?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 text-muted-foreground",children:[(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,a.jsx)("span",{children:"Loading..."})]})}):r?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 text-muted-foreground",children:[(0,a.jsxs)("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,a.jsx)("span",{children:"Redirecting..."})]})})}function E(e){let{children:t}=e;return(0,a.jsx)(y.AuthProvider,{children:(0,a.jsxs)(k.ToastProvider,{children:[(0,a.jsx)(j.Toaster,{position:"top-right"}),(0,a.jsx)(C,{children:(0,a.jsx)(l.X,{children:(0,a.jsxs)("div",{className:"min-h-screen flex flex-col transition-colors duration-300",style:{backgroundColor:"var(--onboarding-bg)"},children:[(0,a.jsx)("div",{className:"z-50",children:(0,a.jsx)("div",{className:"max-w-6xl mx-auto px-4 py-4",children:(0,a.jsx)(x,{})})}),(0,a.jsx)("div",{className:"flex-1 pb-4",children:t}),(0,a.jsx)(w,{})]})})})]})})}},26095:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},27541:(e,t,r)=>{"use strict";var a=r(43041);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},30941:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6a7.5 7.5 0 1 0 7.5 7.5h-7.5V6Z"}),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5H21A7.5 7.5 0 0 0 13.5 3v7.5Z"}))})},48037:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))})},50349:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"}))})},55445:(e,t,r)=>{"use strict";r.d(t,{DB:()=>l,Ox:()=>o,W1:()=>s,be:()=>n});var a=r(81699);async function n(e){try{let t=await a.Ay.get("/onboarding/".concat(e));if(!t.data)return null;let r=t.data,n="data"in r&&r.data?r.data:r;return{currentStep:n.current_step||"welcome",completedSteps:n.completed_steps||[],data:n.onboarding_data||{},startedAt:n.started_at?new Date(n.started_at):void 0,completedAt:n.completed_at?new Date(n.completed_at):void 0}}catch(e){var t;if((null==(t=e.response)?void 0:t.status)===404)return null;throw e}}async function s(e,t){await a.Ay.post("/onboarding",{userId:e,currentStep:t.currentStep,completedSteps:t.completedSteps,data:t.data,startedAt:t.startedAt,completedAt:t.completedAt})}async function l(e){try{let t=(await a.Ay.get("/onboarding/".concat(e,"/status"))).data;return("data"in t&&t.data?t.data:t).completed}catch(e){return!1}}async function o(e){await a.Ay.post("/onboarding/".concat(e,"/finalize"))}},59551:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},64682:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))})},67184:(e,t,r)=>{"use strict";r.d(t,{X:()=>m,z:()=>h});var a=r(54568),n=r(7620),s=r(27541),l=r(72203),o=r(93558),i=r(55445);let c=["welcome","income","debts","budget","complete"],d={welcome:"/onboarding/welcome",income:"/onboarding/income",debts:"/onboarding/debts",budget:"/onboarding/budget",complete:"/onboarding/complete"},u=(0,n.createContext)(void 0);function m(e){let{children:t}
1=e,[r,m]=(0,n.useState)(null),[h,b]=(0,n.useState)(!0),[p,f]=(0,n.useState)(!1),g=n.useRef(null),x=(0,s.useRouter)();(0,s.usePathname)();let{user:v}=(0,l.A)();(0,n.useEffect)(()=>{!async function(){if(!v)return b(!1);try{let e=await (0,i.be)(v.id);if(e)m(e);else{let e={currentStep:"welcome",completedSteps:[],data:{},startedAt:new Date};m(e),await (0,i.W1)(v.id,e)}}catch(e){m({currentStep:"welcome",completedSteps:[],data:{},startedAt:new Date})}finally{b(!1)}}()},[v]);let w=(0,n.useCallback)(e=>{if(!r)return!1;let t=c.indexOf(e);return t<=c.indexOf(r.currentStep)||c.slice(0,t).filter(e=>!!("debts"===e&&r.completedSteps.includes("debts"))||"debts"!==e||null!==r.data.debts).every(e=>r.completedSteps.includes(e)||"debts"===e)},[r]),y=(0,n.useCallback)(e=>{w(e)&&x.push(d[e])},[w,x]),k=(0,n.useCallback)(async e=>{if(r&&v&&!p){f(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>f(!1),3e4);try{let t=c.indexOf(r.currentStep),a=c[t+1],n={...r,completedSteps:[...new Set([...r.completedSteps,r.currentStep])],currentStep:a||"complete",data:{...r.data,[r.currentStep]:e},completedAt:void 0===a?new Date:void 0};await (0,i.W1)(v.id,n),m(n),a&&("complete"===a?x.replace(d[a]):x.push(d[a]))}catch(e){o.Ay.error("Failed to save your progress. Please try again.")}finally{g.current&&clearTimeout(g.current),f(!1)}}},[r,v,x,p]),j=(0,n.useCallback)(async()=>{if(!r||!v)return;let e=c.indexOf(r.currentStep);if(!(e<=0)&&!p){f(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>f(!1),3e4);try{let t=c[e-1],a={...r,currentStep:t};await (0,i.W1)(v.id,a),m(a),x.push(d[t])}catch(e){alert("Failed to navigate. Please try again.")}finally{g.current&&clearTimeout(g.current),f(!1)}}},[r,v,x,p]),N=(0,n.useCallback)(async()=>{if(r&&v&&"debts"===r.currentStep&&!p){f(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>f(!1),3e4);try{let e={...r,completedSteps:[...new Set([...r.completedSteps,"debts"])],currentStep:"budget",data:{...r.data,debts:null}};await (0,i.W1)(v.id,e),m(e),x.push(d.budget)}catch(e){alert("Failed to skip debt step. Please try again.")}finally{g.current&&clearTimeout(g.current),f(!1)}}},[r,v,x,p]),S=(0,n.useCallback)(async()=>{if(!v)return;let e={currentStep:"welcome",completedSteps:[],data:{},startedAt:new Date};m(e);try{await (0,i.W1)(v.id,e),x.push(d.welcome)}catch(e){}},[v,x]),C=(null==r?void 0:r.currentStep)==="complete"||(null==r?void 0:r.completedSteps.includes("complete"))||!1;return(0,a.jsx)(u.Provider,{value:{state:r,loading:h,saving:p,canNavigateTo:w,navigateToStep:y,completeCurrentStep:k,previousStep:j,skipDebtStep:N,isOnboardingComplete:C,resetOnboarding:S},children:t})}function h(){let e=(0,n.useContext)(u);if(!e)throw Error("useOnboarding must be used within OnboardingProvider");return e}},87470:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7620);let n=a.forwardRef(function(e,t){let{title:r,titleId:n,...s}=e;return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},s),r?a.createElement("title",{id:n},r):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a2.25 2.25 0 0 0-2.25-2.25H15a3 3 0 1 1-6 0H5.25A2.25 2.25 0 0 0 3 12m18 0v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6m18 0V9M3 12V9m18 0a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 9m18 0V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v3"}))})},94759:(e,t,r)=>{Promise.resolve().then(r.bind(r,24651))}},e=>{e.O(0,[1090,3558,2203,587,6531,7358],()=>e(e.s=94759)),_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.