1/*! For license information please see 2740.743a06ec.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[2740],{359(e,t,s){s.r(t),s.d(t,{default:()=>o});var r=s(5043),i=s(7874),a=s(6833),n=s(6245),c=s(2024),l=s(3046),d=s(579);const o=()=>{const[e]=(0,i.ok)(),t=e.get("token"),[s,o]=(0,r.useState)("loading"),[m,x]=(0,r.useState)(""),u=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{if(!u.current){if(u.current=!0,!t)return o("error"),void x("This confirmation link is invalid.");(async()=>{try{var e;const r=await l.A.post("".concat("https://www.bagchee.com/api","/newsletter-subs/confirm"),{token:t});var s;if(null!==(e=r.data)&&void 0!==e&&e.status)o("success"),x(r.data.msg||"Your subscription is confirmed.");else o("error"),x((null===(s=r.data)||void 0===s?void 0:s.msg)||"We could not confirm your subscription.")}catch(a){var r,i;o("error"),x((null===(r=a.response)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.msg)||"This confirmation link has expired or is invalid.")}})()}},[t]),(0,d.jsx)("div",{className:"min-h-[60vh] bg-cream-50 flex items-center justify-center px-4 py-16 font-body",children:(0,d.jsxs)("div",{className:"max-w-md w-full bg-white rounded-2xl shadow-lg border border-cream-200 p-8 text-center",children:["loading"===s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.A,{className:"animate-spin text-primary mx-auto mb-5",size:40}),(0,d.jsx)("h1",{className:"text-xl font-display text-text-main",children:"Confirming your subscription\u2026"})]}),"success"===s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"w-16 h-16 bg-green-50 rounded-full flex items-center justify-center mx-auto mb-5",children:(0,d.jsx)(a.A,{className:"text-green-600",size:34})}),(0,d.jsx)("h1",{className:"text-2xl font-display text-text-main mb-3",children:"You're subscribed! \ud83c\udf89"}),(0,d.jsx)("p",{className:"text-text-muted text-sm leading-relaxed mb-6",children:m}),(0,d.jsx)(i.N_,{to:"/",className:"inline-block bg-primary text-white px-6 py-2.5 rounded-lg font-bold text-sm hover:bg-primary-dark transition-colors",children:"Start Exploring"})]}),"error"===s&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"w-16 h-16 bg-red-50 rounded-full flex items-center justify-center mx-auto mb-5",children:(0,d.jsx)(n.A,{className:"text-red-500",size:34})}),(0,d.jsx)("h1",{className:"text-2xl font-display text-text-main mb-3",children:"Link not valid"}),(0,d.jsx)("p",{className:"text-text-muted text-sm leading-relaxed mb-6",children:m}),(0,d.jsx)(i.N_,{to:"/newsletter/subscribe",className:"inline-block bg-primary text-white px-6 py-2.5 rounded-lg font-bold text-sm hover:bg-primary-dark transition-colors",children:"Subscribe again"})]})]})})}},2024(e,t,s){s.d(t,{A:()=>r});const r=(0,s(7784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},6245(e,t,s){s.d(t,{A:()=>r});const r=(0,s(7784).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},6833(e,t,s){s.d(t,{A:()=>r});const r=(0,s(7784).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])}}]); 3//# sourceMappingURL=2740.743a06ec.chunk.js.map
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.