(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{694:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var r=s(5155),i=s(2115),a=s(4465),n=s(6603),l=s(9783);let o=e=>{let{buttonText:t="Keep Me Updated",successTitle:s="Thank you for signing up!",successMessage:o="We'll notify you when Early Access launches.",className:c=""}=e,[d,m]=(0,i.useState)(""),[u,x]=(0,i.useState)(!1),[h,g]=(0,i.useState)(!1),[b,f]=(0,i.useState)(""),p=async e=>{e.preventDefault(),g(!0),f("");try{let e=await fetch((0,l.e)("/email/signup-email"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:d})}),t=await e.json();if(!e.ok)throw Error(t.error||"Failed to subscribe");console.log("Email signup successful:",t),x(!0),m(""),setTimeout(()=>x(!1),5e3)}catch(e){console.error("Error subscribing email:",e),f(e.message||"Failed to subscribe. Please try again."),setTimeout(()=>f(""),5e3)}finally{g(!1)}};return(0,r.jsxs)("div",{className:c,children:[(0,r.jsx)(n.A,{visible:!u,children:(0,r.jsxs)("form",{onSubmit:p,className:"flex flex-col gap-4 justify-center items-center max-w-md mx-auto",children:[(0,r.jsxs)("div",{className:"flex flex-col md:flex-row w-full gap-4",children:[(0,r.jsx)("input",{type:"email",value:d,onChange:e=>m(e.target.value),placeholder:"Your email address",required:!0,disabled:h,className:"w-full md:w-2/3 px-4 py-3 rounded-sm text-mystic-900 focus:outline-none focus:ring-2 focus:ring-sand-400 bg-white"}),(0,r.jsx)(a.A,{type:"submit",disabled:h,className:"w-full md:w-auto px-6 py-3 font-bold text-lg",children:h?"Subscribing...":t})]}),b&&(0,r.jsx)("div",{className:"w-full bg-danger-100 border border-danger-300 text-danger-700 px-4 py-2 rounded-sm text-sm",children:b})]})}),(0,r.jsx)(n.A,{visible:u,children:(0,r.jsxs)("div",{className:"bg-sand-400 text-mystic-400 px-6 py-4 rounded-sm max-w-md mx-auto",children:[(0,r.jsx)("p",{className:"font-bold",children:s}),(0,r.jsx)("p",{className:"text-sm",children:o})]})})]})}},2528:(e,t,s)=>{"use strict";s.d(t,{A:()=>o,AuthProvider:()=>l});var r=s(5155),i=s(2115),a=s(5695);let n=(0,i.createContext)(null),l=e=>{let{children:t}=e,[s,l]=(0,i.useState)(null),[o,c]=(0,i.useState)(null),[d,m]=(0,i.useState)(!0),u=(0,a.useRouter)();return(0,i.useEffect)(()=>{let e=localStorage.getItem("authToken");e&&(c(e),l({isAuthenticated:!0})),m(!1)},[]),(0,r.jsx)(n.Provider,{value:{user:s,token:o,login:e=>{localStorage.setItem("authToken",e),c(e),l({isAuthenticated:!0}),console.log("User logged in, token stored.")},logout:()=>{localStorage.removeItem("authToken"),c(null),l(null),console.log("User logged out, token removed."),u.push("/login")},isLoading:d},children:t})},o=()=>{let e=(0,i.useContext)(n);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e}},2723:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(5155);s(2115);var i=s(6874),a=s(694);let n=()=>(0,r.jsx)("section",{className:"w-full py-20 bg-gradient-to-r from-river-700 to-river-800 flex items-center justify-center",children:(0,r.jsxs)("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[(0,r.jsx)("h2",{className:"text-4xl font-extrabold text-sand-400 mb-4 drop-shadow-lg",children:"Be First in Line"}),(0,r.jsx)("p",{className:"text-xl text-mystic-200 mb-8",children:"Sign up for email updates and be notified when Early Access launches. Get ready to become a Forerunner!"}),(0,r.jsx)(a.default,{})]})})},3583:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(5155),i=s(2115),a=s(6603);let n=[{question:"How does Prudence Thirty help me overcome addiction?",answer:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et."},{question:"What happens after the 30-day free trial?",answer:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et."},{question:"Can I use Prudence Thirty on my mobile device?",answer:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et."},{question:"Is my data private and secure?",answer:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et."},{question:"What if I miss a day of logging?",answer:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et."},{question:"How do the personalized predictions work?",answer:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et."},{question:"What makes Prudence Thirty different from other apps?",answer:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur et."}],l=()=>{let[e,t]=(0,i.useState)(null),s=s=>{t(e===s?null:s)};return(0,r.jsx)("section",{className:"w-full py-24 bg-gradient-to-r from-zinc-200 to-zinc-300 border-t border-mystic-200 relative overflow-hidden",children:(0,r.jsxs)("div",{className:"max-w-3xl mx-auto px-4",children:[(0,r.jsx)("h2",{className:"text-4xl font-bold text-center mb-12 text-mystic-700",children:"Frequently Asked Questions"}),(0,r.jsx)("div",{className:"space-y-6",children:n.map((t,i)=>(0,r.jsxs)("div",{className:"rounded-xl border border-mystic-200 bg-white/80 shadow-sm overflow-hidden",children:[(0,r.jsxs)("button",{className:"w-full flex justify-between items-center px-6 py-5 text-lg font-semibold text-mystic-700 hover:text-mystic-900 focus:outline-none focus:ring-2 focus:ring-mystic-400 transition-colors bg-gradient-to-b from-white to-zinc-100 hover:from-zinc-100 hover:to-zinc-200 cursor-pointer",onClick:()=>s(i),"aria-expanded":e===i,"aria-controls":"faq-answer-".concat(i),children:[t.question,(0,r.jsx)("span",{className:"ml-4 transition-transform ".concat(e===i?"rotate-180":""),children:"▼"})]}),(0,r.jsx)(a.A,{visible:e===i,children:(0,r.jsx)("div",{className:"px-6 py-5 bg-gradient-to-br text-river-100 from-river-400 to-river-500",children:t.answer})})]},i))})]})})}},3611:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s(5155),i=s(2115),a=s(6874),n=s.n(a),l=s(2528);let o=e=>{let{currentPage:t=null}=e,{user:s,logout:a}=(0,l.A)(),[o,c]=(0,i.useState)("release"),[d,m]=(0,i.useState)(!1),u=(0,i.useRef)(null);return(0,i.useEffect)(()=>{c("pre-early-access")},[]),(0,i.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&m(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,r.jsx)("div",{className:"space-x-4 flex items-center",children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n(),{href:"/progress",className:"".concat("progress"===t?"text-sand-400 font-bold":"hover:text-indigo-200"),children:"Progress"}),(0,r.jsx)(n(),{href:"/stats",className:"".concat("stats"===t?"text-sand-400 font-bold":"hover:text-indigo-200"),children:"Stats"}),(0,r.jsx)(n(),{href:"/inventory",className:"".concat("inventory"===t?"text-sand-400 font-bold":"hover:text-indigo-200"),children:"Inventory"}),(0,r.jsxs)("div",{className:"relative inline-block margin-top-[-4px] relative top-[2px]",ref:u,children:[(0,r.jsx)("button",{onClick:()=>m(!d),className:"flex items-center justify-center w-8 h-8 rounded-full bg-sand-600 hover:bg-sand-500 transition-colors cursor-pointer",children:(0,r.jsx)("svg",{className:"w-5 h-5 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})})}),d&&(0,r.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50",children:[(0,r.jsx)(n(),{href:"/account",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",onClick:()=>m(!1),children:"Account"}),(0,r.jsx)(n(),{href:"/subscription",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",onClick:()=>m(!1),children:"Subscription"}),(0,r.jsx)("hr",{className:"my-1"}),(0,r.jsx)("button",{onClick:()=>{m(!1),a()},className:"block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:"Logout"})]})]})]}):(0,r.jsx)(r.Fragment,{children:"pre-early-access"!==o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n(),{href:"/signup",className:"hover:text-indigo-200",children:"Sign Up"}),(0,r.jsx)(n(),{href:"/login",className:"hover:text-indigo-200",children:"Login"})]})})})}},4465:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var r=s(5155);function i(e){let{children:t,type:s="button",disabled:i=!1,onClick:a,className:n="",mode:l="primary",style:o={}}=e,c="";switch(l){case"bland":c="text-white bg-gray-500 hover:bg-gray-400 disabled:bg-gray-500 disabled:text-white";break;case"primary":default:c="text-white bg-river-500 hover:bg-river-400 disabled:bg-river-500 disabled:text-white";break;case"danger":c="text-white bg-danger-500 hover:bg-danger-400 disabled:bg-danger-500 disabled:text-white";break;case"success":c="text-white bg-mystic-500 hover:bg-mystic-400 disabled:bg-mystic-500 disabled:text-white"}return(0,r.jsx)("button",{type:s,onClick:a,disabled:i,className:"w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium ".concat(c," focus:outline-none transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed ").concat(n),style:o,children:t})}},4928:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var r=s(5155),i=s(2115);function a(e){let{targetDate:t}=e,[s,a]=(0,i.useState)({days:0,hours:0,minutes:0,seconds:0}),[l,o]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=()=>{let e=new Date(t)-new Date;if(!(e>0))return{days:0,hours:0,minutes:0,seconds:0};{let t=Math.floor(e/864e5),s=Math.floor(e%864e5/36e5);return{days:t,hours:s,minutes:Math.floor(e%36e5/6e4),seconds:Math.floor(e%6e4/1e3)}}},s=e();a(s),Object.values(s).every(e=>0===e)&&setTimeout(()=>window.location.reload(),3e3);let r=setInterval(()=>{let t=e();!Object.values(t).every(e=>0===e)&&Object.values(t).every(e=>0===e)&&setTimeout(()=>window.location.reload(),3e3),a(e=>(e.seconds!==t.seconds&&(o(!0),setTimeout(()=>o(!1),500)),t))},1e3);return()=>clearInterval(r)},[t]),(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center my-6",children:[(0,r.jsx)("h2",{className:"text-xl font-bold mb-4 text-sand-500",children:"Prudence Thirty Launches In:"}),(0,r.jsxs)("div",{className:"flex flex-row gap-4 text-center",children:[(0,r.jsx)(n,{value:s.days,label:"Days",isAnimating:l}),(0,r.jsx)(n,{value:s.hours,label:"Hours",isAnimating:l}),(0,r.jsx)(n,{value:s.minutes,label:"Minutes",isAnimating:l}),(0,r.jsx)(n,{value:s.seconds,label:"Seconds",isAnimating:l})]})]})}function n(e){let{value:t,label:s,isAnimating:i}=e;return(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)("div",{className:"bg-sand-50 text-sand-500 font-bold text-2xl md:text-3xl lg:text-4xl \n rounded-md w-16 md:w-20 lg:w-24 py-3 shadow-md\n ".concat(i?"animate-pulse":""),children:t<10?"0".concat(t):t}),(0,r.jsx)("span",{className:"text-sand-100 text-sm mt-2",children:s})]})}},5305:(e,t,s)=>{"use strict";s.d(t,{default:()=>a});var r=s(5155);s(2115),s(6874),s(4465),s(6766);let i=[{name:"Recruit - Free Tier",features:["Daily progress tracking","Personalized threat level predictions","Visual journey","Basic character customization","Basic rewards"],price:"No cost, ever.",highlight:!1,bg:"bg-mystic-100/80",border:"border-mystic-400",text:"text-mystic-900",cta:null},{name:"Forerunner Pack - Early Access",features:["1-year Pro membership","Permanent 50% discount on future Pro plans","Exclusive Forerunner Outfit","Forerunner badge on profile","Support our mission as an early adopter"],price:"$49.99 (one-time payment)",highlight:!0,bg:"bg-green-100/80",border:"border-green-400",text:"text-green-900",cta:"Become a Forerunner",badge:"Limited Time Offer",savings:"44% savings vs. standard annual Pro plan",buttonMode:"success"}],a=()=>(0,r.jsxs)("section",{id:"pricing",className:"w-full py-24 bg-gradient-to-b from-mystic-50 to-river-50 border-t border-mystic-200 relative overflow-hidden",children:[(0,r.jsxs)("div",{className:"max-w-5xl mx-auto px-4",children:[(0,r.jsx)("h2",{className:"text-4xl font-bold text-center mb-6 text-mystic-700",children:"Affordable Plans to Support Your Journey"}),(0,r.jsx)("p",{className:"text-lg text-mystic-500 text-center mb-14 max-w-2xl mx-auto",children:"Be among the first to join Prudence Thirty with our exclusive Forerunner Pack!"}),(0,r.jsx)("div",{className:"flex flex-col md:flex-row gap-8 md:gap-12 justify-center items-stretch pricing-details mb-12",children:i.map((e,t)=>(0,r.jsxs)("div",{className:"plan flex-1 rounded-2xl border shadow-lg ".concat(e.bg," ").concat(e.border," ").concat(e.text," flex flex-col items-center px-8 py-10 relative ").concat(e.highlight?"ring-2 ring-danger-400 z-10":""," backdrop-blur-sm z-100"),children:[e.highlight&&(0,r.jsx)("span",{className:"absolute top-4 right-4 bg-danger-500 text-white text-xs font-bold px-3 py-1 rounded-full shadow",children:e.badge||"Most Popular"}),(0,r.jsx)("h3",{className:"text-2xl font-bold mb-4 tracking-wide",children:e.name}),(0,r.jsx)("ul",{className:"mb-6 text-left space-y-2",children:e.features.map((e,t)=>(0,r.jsxs)("li",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-mystic-400 mr-2"}),e]},t))}),(0,r.jsx)("p",{className:"mb-6 font-semibold ".concat(e.highlight?"text-danger-600":"text-mystic-700"),children:e.price}),e.savings&&(0,r.jsx)("p",{className:"text-sm text-danger-500 font-medium mb-4",children:e.savings}),e.cta&&!1,e.name.includes("Forerunner")&&(0,r.jsx)("div",{className:"mt-auto",children:(0,r.jsx)("p",{className:"text-sm text-mystic-500 font-medium mb-4",children:"Available for purchase after Early Access launch."})})]},e.name))})]}),(0,r.jsx)("div",{className:"mt-8 text-center text-xs text-mystic-300 hidden lg:block absolute -bottom-10 -right-50 lg:-right-64 xl:-right-44",children:(0,r.jsx)("img",{src:"/images/angel.png",alt:"Angel",width:598,height:600})})]})},6214:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(5155);s(2115);let i=[{title:"Sign up and start your free trial.",description:"Create your account in minutes and unlock all premium features for 30 days. Our streamlined onboarding process gets you started quickly with a personalized dashboard tailored to your specific needs and goals. No credit card required to begin your journey.",imageAlt:"Sign up illustration",imageSrc:"/images/benefit1.png",imageSrc2:"/images/benefit1_716.png"},{title:"Log your progress daily.",description:"Each morning, record your progress from the day before. Our simple check-in system takes less than a minute but provides powerful data for your recovery journey. Track your victories to build a comprehensive picture of your habits and patterns.",imageAlt:"Log progress illustration",imageSrc:"/images/benefit2.png",imageSrc2:"/images/benefit2_716.png"},{title:"Receive personalized insights.",description:"Get smart predictions to help you avoid danger and survive the day. Our AI-powered system analyzes your patterns and warns you when a difficult day is coming. Gobal data from the community is used until you have enough data to make personalized predictions.",imageAlt:"Insights illustration",imageSrc:"/images/benefit3.png",imageSrc2:"/images/benefit3_716.png"},{title:"Build your 30-day streak.",description:"Visualize your progress as you journey through enemy territory to reach freedom. Watch your character advance through a dangerous world with each successful day. Earn rewards, unlock achievements, and see tangible evidence of your growth as you build momentum toward lasting change.",imageAlt:"30-day streak illustration",imageSrc:"/images/benefit4.png",imageSrc2:"/images/benefit4_716.png"}],a=[{title:"Sign up for Early Access notifications.",description:"Join our waiting list to be notified when Early Access launches on September 2nd, 2025. Be prepared to secure your spot as a Forerunner and enjoy exclusive benefits including permanent discounts on Pro membership, special in-game items, and early adopter recognition.",imageAlt:"Sign up illustration",imageSrc:"/images/benefit1.png",imageSrc2:"/images/benefit1_716.png"}],n=()=>{let e;return e=[a[0],...i.slice(1)],(0,r.jsxs)("section",{className:"w-full py-24 bg-gradient-to-r from-river-50 to-river-100 relative overflow-hidden",children:[(0,r.jsxs)("div",{className:"max-w-5xl mx-auto px-4",children:[(0,r.jsx)("h2",{className:"text-4xl font-bold text-center mb-16 text-river-500",children:"How It Works"}),(0,r.jsx)("div",{className:"flex flex-col gap-16",children:e.map((e,t)=>{var s="",i="border-b md:border-b-0 md:border-r";return t%2==1&&(s="md:flex-row-reverse",i="border-b md:border-b-0 md:border-l"),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-center md:items-start ".concat(s," bg-mystic-100 rounded-xl border overflow-hidden border-mystic-500 z-100"),children:[(0,r.jsxs)("div",{className:"w-full flex-shrink-0 md:w-[300px] h-[300px] bg-mystic-700 ".concat(i," border-mystic-500 overflow-hidden flex items-center justify-center"),children:[(0,r.jsx)("img",{src:e.imageSrc,alt:e.imageAlt,width:300,height:300,className:"object-cover w-full h-full opacity-80 hidden md:block",style:{background:"#E0E7EF"}}),(0,r.jsx)("img",{src:e.imageSrc2,alt:e.imageAlt,width:716,height:477,className:"object-cover w-full h-full opacity-80 md:hidden",style:{background:"#E0E7EF"}})]}),(0,r.jsxs)("div",{className:"flex-1 w-full",children:[(0,r.jsxs)("div",{className:"flex items-center mb-4 p-4 bg-mystic-400 border-b border-mystic-500",children:[(0,r.jsxs)("span",{className:"text-2xl font-bold text-mystic-300 mr-4",children:["Step ",t+1]}),(0,r.jsx)("span",{className:"h-1 w-8 bg-mystic-300 rounded-full"})]}),(0,r.jsxs)("div",{className:"px-4",children:[(0,r.jsx)("h3",{className:"text-2xl font-semibold text-river-500 mb-2",children:e.title}),(0,r.jsx)("p",{className:"text-lg text-mystic-400",children:e.description})]})]})]},t)})})]}),(0,r.jsx)("div",{className:"mt-8 text-center text-xs text-mystic-300 hidden md:block absolute -bottom-10 -left-20 lg:left-0 xl:left-10",children:(0,r.jsx)("img",{src:"/images/totem.png",alt:"Totem"})})]})}},6603:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var r=s(5155),i=s(2115);function a(e){let{children:t,visible:s=!1,className:a="",onOpenComplete:n=()=>{},onCloseComplete:l=()=>{}}=e,[o,c]=(0,i.useState)(0),[d,m]=(0,i.useState)(s),u=(0,i.useRef)(null);return(0,i.useEffect)(()=>{s?(m(!0),setTimeout(()=>{u.current&&c(u.current.scrollHeight)},10)):c(0)},[s]),(0,r.jsx)("div",{className:"overflow-hidden transition-all duration-300 ease-in-out ".concat(a),style:{height:d?"".concat(o,"px"):"0px"},onTransitionEnd:()=>{s||0!==o?s&&o>0&&n():(m(!1),l())},children:(0,r.jsx)("div",{ref:u,children:t})})}},8100:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(5155),i=s(6874),a=s.n(i),n=s(3611);s(2115);let l=e=>{let{titleOnly:t=!1,currentPage:s=null}=e;return(0,r.jsx)("header",{className:"text-white p-4 w-full",children:(0,r.jsxs)("nav",{className:"container mx-auto flex justify-between items-center",children:[(0,r.jsxs)(a(),{href:"/",className:"text-xl font-bold text-sand-300",children:["Prudence",(0,r.jsx)("span",{className:"text-danger-500",children:"Thirty"})]}),!t&&(0,r.jsx)(n.default,{currentPage:s})]})})}},9783:(e,t,s)=>{"use strict";s.d(t,{e:()=>i});let r=()=>"http://localhost:3000",i=e=>"".concat(r()).concat(e)},9829:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,6874,23)),Promise.resolve().then(s.t.bind(s,3063,23)),Promise.resolve().then(s.bind(s,2723)),Promise.resolve().then(s.bind(s,4928)),Promise.resolve().then(s.bind(s,694)),Promise.resolve().then(s.bind(s,3583)),Promise.resolve().then(s.bind(s,5305)),Promise.resolve().then(s.bind(s,6214)),Promise.resolve().then(s.bind(s,8100))}},e=>{var t=t=>e(e.s=t);e.O(0,[244,766,441,684,358],()=>t(9829)),_N_E=e.O()}]);