PageSourceSearch

https://www.thejuggernaut.com/_next/static/chunks/pages/settings-2edb7b43e1ef5282.js

js thejuggernaut.com collected 2026-10-02 04:17:24 UTC 63,194 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[662],{52837:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings",function(){return s(87484)}])},17477:function(e,t,s){"use strict";s.d(t,{Z:function(){return x}});var a=s(85893),r=s(25675),n=s.n(r),l=s(67294),i=s(23650),o=s(89755),d=s.n(o),c=e=>{let{size:t,userCode:s}=e,{userRecord:r}=(0,l.useContext)(i.S),[n,o]=(0,l.useState)(""),[c,m]=(0,l.useState)(null);if((0,l.useEffect)(()=>{(async function(){try{let e=await fetch("/api/user-profile?userCode=".concat(s));if(!e.ok)throw Error("Failed to fetch user info");let t=await e.json();m(t)}catch(e){console.log("Error fetching user info:",e)}})()},[s]),!r)return null;let u=(null==c?void 0:c.current_streak)||0;return(0,a.jsx)("div",{className:t>100?"bg-gray-100 w-[60px] rounded-xl z-2 absolute -right-2 -bottom-2":"bg-gray-100 w-10 h-8 rounded-lg z-2 absolute  -bottom-5 -right-2",children:u>0?(0,a.jsxs)("div",{className:"relative flex items-center justify-center",children:[(0,a.jsx)(d(),{src:"/flame_color.png",className:"",alt:"Streak flame with color",width:20,height:20}),(0,a.jsx)("span",{className:"text-black block w-max font-mono text-xs pt-4",children:u})]}):(0,a.jsxs)("div",{className:" relative flex items-center  justify-center",children:[(0,a.jsx)(d(),{src:"/flame_gray.png",className:"",alt:"Streak flame gray",width:20,height:20}),(0,a.jsx)("span",{className:"text-black block w-max font-mono text-xs pt-4",children:u})]})})},m=s(41664),u=s.n(m),x=e=>{let{firstName:t,lastName:s,profilePhotoUrl:r,size:l,userRefercode:i}=e,o="".concat(t[0]).concat(s[0]).toUpperCase();return(0,a.jsx)(u(),{href:i?"/u/".concat(i):"#",className:"",children:(0,a.jsxs)("div",{className:l?"relative w-[128px] h-[128px] bg-red-500 text-white flex items-center justify-center rounded-full flex-shrink-0":"relative w-[60px] h-[60px] bg-red-500 text-white flex items-center justify-center rounded-full flex-shrink-0",children:[r?(0,a.jsx)(n(),{src:r,alt:"Profile photo",width:l||60,height:l||60,className:"rounded-full object-cover"}):o,(0,a.jsx)(c,{size:l||0,userCode:i})]})})}},99606:function(e,t,s){"use strict";var a=s(85893);t.Z=e=>{let{loading:t,action:s,text:r,color:n,disabled:l,size:i}=e;return(0,a.jsxs)("button",{type:"submit",className:"uppercase py-3 px-8 border border-transparent rounded-md shadow-sm text-sm font-medium text-white ".concat(t||l?"red"===n?"bg-red-400":"bg-gray-400":"red"===n?"bg-red-500 hover:bg-red-600":"bg-gray-500 hover:bg-gray-600","  focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ").concat(i||"text-sm"),onClick:s,disabled:t||l,children:[t&&(0,a.jsxs)("svg",{role:"status",className:"inline w-4 h-4 mr-3 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),(0,a.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]}),t?"Loading":r]})}},69021:function(e,t,s){"use strict";var a=s(85893),r=s(42743);t.Z=e=>{var t,s,n,l,i,o;let{plan:d,checked:c,desktop:m}=e;return(null==d?void 0:d.name)==="Annual"&&m?(0,a.jsxs)("div",{className:"flex flex-row-reverse sm:flex-col-reverse",children:[(0,a.jsx)("div",{className:"font-medium ".concat(c?"text-green-600":"text-green-500","  sm:mr-0 ml-2 text-base"),children:(null===(n=r.y_.get(d.currency))||void 0===n?void 0:n.otherPlans[2])?d.price+"/mo":(null===(l=r.y_.get(d.currency))||void 0===l?void 0:l.currencySymbol)+(d.number/5200).toFixed(2)+"/week"}),(0,a.jsx)("div",{className:"font-medium ".concat(c?"text-black":"text-gray-900"," line-through sm:mr-0"),children:(null===(i=r.y_.get(d.currency))||void 0===i?void 0:i.otherPlans[2])?(null===(o=r.y_.get(d.currency))||void 0===o?void 0:o.otherPlans[2].price)+"/mo":""})]}):(0,a.jsx)("span",{className:" text-green-600 text-lg font-medium \n\n      \n      ",children:(null===(t=r.y_.get(d.currency))||void 0===t?void 0:t.otherPlans[2])?d.price+"/mo":(null===(s=r.y_.get(d.currency))||void 0===s?void 0:s.currencySymbol)+(d.number/5200).toFixed(2)+"/week"})}},52692:function(e,t,s){"use strict";s.d(t,{d:function(){return n},h:function(){return l}});var a=s(74231);let r=/.edu|uwaterloo.ca|yorku.ca|aucklanduni.ac.nz|ucalgary.ca|mcgill.ca|.ac.u
1k|.ac.in|.waseda.jp|sciencespo.fr|utoronto.ca|ryerson.ca|centennialcollege.ca|uvic.ca|mcmaster.ca|dal.ca|.ac.nz|sfu\.ca|uwo\.ca|spjain\.org|nls.ac.in|mun.ca|mumail.ie|students.unibe.ch|graduateinstitute.ch|mamcs.christuniversity.in|umail.ucc.ie|uva.nl|stud.macromedia.de|lhi.is|torontomu.ca|ekohist.su.se|ph-heidelberg.de|tcd.ie|uni-kiel.de|mail.uni-kiel.de|nmims.in|uni-stuttgart.de|myumanitoba.ca|student.ubc.ca|uzh.ch|micamail.in|lf1.cuni.cz|bishops.com|wur.nl|astranova.org|gsom.polimi.it|mail.toronto.ca|uoguelph.ca|stud.uni-heidelberg.de|zu.ac.ae|student.ocadu.ca|mcpsmd.org|our.ecu.edu.au|beaconsfield.school|stu.palmbeachschools.org|dalton.org|[email protected]|my.bpp.com|mylangara.ca|ualberta.ca|iu-study.org|student.eur.nl|uni-muenster.de|juggernaut.com/,n=a.Ry().shape({firstName:a.Z_().required("You forgot to write your first name."),lastName:a.Z_().required("You forgot to write your last name."),email:a.Z_().email("The email you added is invalid.").required("You forgot to add your student email address.").matches(r,"Please enter a valid student email."),password:a.Z_().required("You forgot to create a password").min(3,"Your password is too short.")}),l=e=>!!e.match(r)&&!e.includes("alumni")},76135:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return m}});var a=s(85893),r=s(9008),n=s.n(r),l=s(67294),i=s(2663),o=s(23650),d=s(88057),c=s(62435);function m(){(0,i.Qf)();let[e,t]=(0,l.useState)(!1),[s,r]=(0,l.useState)("Copy"),{userRecord:m,userLoading:u}=(0,l.useContext)(o.S);if(u)return(0,a.jsx)(a.Fragment,{});let x="https://www.thejuggernaut.com/subscribe?refer=".concat(null==m?void 0:m.referral_code);return(0,a.jsxs)("div",{className:"font-mono relative sm:py-16 py-8 bg-white overflow-hidden",children:[(0,a.jsxs)(n(),{children:[(0,a.jsx)("title",{children:"The South Asian stories you need to know | The Juggernaut"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"}),(0,a.jsx)("meta",{name:"description",content:"We're The Juggernaut. We tell in-depth, nuanced stories on South Asians around the world. Join thousands and subscribe today."}),(0,a.jsx)("meta",{name:"apple-itunes-app",content:"app-id=1498308080"})]}),(0,a.jsx)("div",{className:"relative px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)("div",{className:"flex flex-col text-lg max-w-xl mx-auto",children:[(0,a.jsx)("h1",{children:(0,a.jsxs)("span",{className:"sm:mt-2 block text-2xl text-center leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl",children:["\uD83D\uDCB5 Refer a friend, get $",d.X1/100," \uD83D\uDCB5"]})}),(0,a.jsxs)("span",{className:"mt-8 text-md sm:text-xl text-center text-gray-900 leading-8",children:["If you’re enjoying The Juggernaut, why not share the love?",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),(0,a.jsxs)("ol",{className:"leading-8",children:[(0,a.jsx)("li",{children:"1. Send a loved one your unique link"}),(0,a.jsxs)("li",{children:["2. They get $",d.X1/100," off an annual plan"]}),(0,a.jsxs)("li",{children:["3. You get $",d.X1/100," in cash or account credit"]})]}),(0,a.jsx)("br",{}),"Now that's a win-win."]}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),t(!0),navigator.clipboard.writeText(x).then(()=>{r("Copied!")},()=>{r("Copy failed!")}),(0,i.F2)(),t(!1)},className:"mt-8 sm:flex justify-center content-center items-center",children:[(0,a.jsx)("label",{htmlFor:"email-address",className:"sr-only",children:"Link"}),(0,a.jsx)("input",{id:"link",name:"link",type:"text",defaultValue:"jgnt.co/subscribe?refer=".concat(null==m?void 0:m.referral_code),required:!0,className:"bg-gray-100 text-sm sm:text-base appearance-none py-3 px-4 block w-[300px] shadow-sm focus:ring-blue-500 focus:border-blue-500 border-gray-300 rounded-md"}),(0,a.jsx)("div",{className:"mt-3 rounded-md shadow sm:mt-0 sm:ml-3 sm:flex-shrink-0",children:(0,a.jsxs)("button",{disabled:e,type:"submit",className:"w-full uppercase flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white ".concat(e?"bg-red-400":"bg-red-500 hover:bg-red-600","  focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"),children:[(0,a.jsx)(c.Z,{className:"h-5 w-6 text-[#fff]  hover:text-white mb-1","aria-hidden":"true"}),e&&(0,a.jsxs)("svg",{role:"status",className:"inline w-4 h-4 mr-3 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),(0,a.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.
11071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]}),e?"Copying":s]})})]})]})})]})}},87484:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return $}});var a=s(85893),r=s(86664),n=s(54465),l=s(19963),i=s(56707),o=s(95301),d=s(59700),c=s(78969),m=s(44740),u=s(38264);s(82606);var x=s(31372),h=s(77004),p=s(86650),g=s(9008),f=s.n(g),b=s(41664),v=s.n(b),j=s(11163),y=s(67294),w=s(86501),N=s(88767),C=s(99606),k=s(2663),S=s(23650),T=s(5038),Z=s(44862),_=s(17477),E=s(22600),U=s(82084);async function M(e,t,s){let a=t.getContext("2d");if(!a)throw Error("No 2d context");let r=e.naturalWidth/e.width,n=e.naturalHeight/e.height,l=window.devicePixelRatio;t.width=Math.floor(s.width*r*l),t.height=Math.floor(s.height*n*l),a.scale(l,l),a.imageSmoothingQuality="high";let i=s.x*r,o=s.y*n,d=e.naturalWidth/2,c=e.naturalHeight/2;a.save(),a.translate(-i,-o),a.translate(d,c),a.translate(-d,-c),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore()}s(26571);var B=s(16896),P=s(5506),F=s(88057);function R(){return(0,a.jsxs)("div",{className:"mt-0 pt-4",children:["For help with your subscription or technical support, please visit our"," ",(0,a.jsx)("a",{href:"https://juggernaut.zendesk.com/hc/en-us",className:"underline text-red-500",children:"help center"}),". (Note: We will not be able to resolve your ticket if you email us at"," ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"underline text-red-500",children:"[email protected]"}),".) If the help center has not answered your question, please email"," ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"underline text-red-500",children:"[email protected]"}),".",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"Our phone number is +1-845-640-3848 (phone hours are Monday through Friday, 8:30 a.m. - 11:30 a.m. ET). We will be slow to respond outside those hours.",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"To reach our editors for tips, corrections, amplifications, or feedback, please email"," ",(0,a.jsx)("a",{href:"mailto:[email protected]",className:"underline text-red-500",children:"[email protected]"})," ","(no pitches or support tickets here please)."]})}var L=s(42743),V=()=>(0,a.jsxs)("svg",{role:"status",className:"inline w-4 h-4 mr-3 text-white animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"#E5E7EB"}),(0,a.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]}),D=s(64019),Y=s(52279),z=e=>{let{showBoolean:t,setShowBoolean:s,icon:r,modalTitle:n,modalContents:l}=e;return(0,a.jsx)(D.u.Root,{show:t,as:y.Fragment,children:(0,a.jsx)(Y.V,{as:"div",className:"fixed z-40 inset-0 overflow-y-auto",onClose:()=>s(!1),children:(0,a.jsxs)("div",{className:"font-mono flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[(0,a.jsx)(D.u.Child,{as:y.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)(Y.V.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,a.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,a.jsx)(D.u.Child,{as:y.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,a.jsxs)("div",{className:"relative -top-32 sm:top-0 inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-sm w-full sm:p-6 ",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-red-100",children:r}),(0,a.jsx)("div",{className:"mt-3 text-center sm:mt-5",children:(0,a.jsx)(Y.V.Title,{as:"h3",className:"text-2xl leading-6 font-bold text-gray-800 mb
1-5",children:n})})]}),l]})})]})})})},A=s(76135),J=s(69021),I=s(52692);let Q={instagram:(0,a.jsx)("svg",{fill:"#dc2626",viewBox:"0 0 24 24",height:"36",width:"36",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z",clipRule:"evenodd"})}),twitter:(0,a.jsx)("svg",{fill:"#dc2626",viewBox:"0 0 24 24",width:"36",height:"36",children:(0,a.jsx)("path",{d:"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"})}),linkedin:(0,a.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"#dc2626",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M14.816 0C15.466 0 16 .512 16 1.152v13.696c0 .63-.533 1.152-1.184 1.152H1.184C.534 16 0 15.477 0 14.848V1.152C0 .512.533 0 1.184 0zM3.563 4.96a1.382 1.382 0 0 0 0-2.763c-.768 0-1.376.619-1.376 1.376 0 .768.608 1.387 1.376 1.387zm10.069 4.49c0-2.058-.437-3.637-2.848-3.637-1.152 0-1.92.63-2.24 1.227h-.032V5.995H6.24v7.637h2.368V9.856c0-.992.181-1.963 1.419-1.963 1.216 0 1.237 1.142 1.237 2.027v3.712h2.368zM2.368 13.633h2.379V5.995H2.368z",fillRule:"evenodd"})}),tiktok:(0,a.jsx)("svg",{fill:"#dc2626",width:"32",height:"32",viewBox:"0 0 512 512",id:"icons",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M412.19,118.66a109.27,109.27,0,0,1-9.45-5.5,132.87,132.87,0,0,1-24.27-20.62c-18.1-20.71-24.86-41.72-27.35-56.43h.1C349.14,23.9,350,16,350.13,16H267.69V334.78c0,4.28,0,8.51-.18,12.69,0,.52-.05,1-.08,1.56,0,.23,0,.47-.05.71,0,.06,0,.12,0,.18a70,70,0,0,1-35.22,55.56,68.8,68.8,0,0,1-34.11,9c-38.41,0-69.54-31.32-69.54-70s31.13-70,69.54-70a68.9,68.9,0,0,1,21.41,3.39l.1-83.94a153.14,153.14,0,0,0-118,34.52,161.79,161.79,0,0,0-35.3,43.53c-3.48,6-16.61,30.11-18.2,69.24-1,22.21,5.67,45.22,8.85,54.73v.2c2,5.6,9.75,24.71,22.38,40.82A167.53,167.53,0,0,0,115,470.66v-.2l.2.2C155.11,497.78,199.36,496,199.36,496c7.66-.31,33.32,0,62.46-13.81,32.32-15.31,50.72-38.12,50.72-38.12a158.46,158.46,0,0,0,27.64-45.93c7.46-19.61,9.95-43.13,9.95-52.53V176.49c1,.6,14.32,9.41,14.32,9.41s19.19,12.3,49.13,20.31c21.48,5.7,50.42,6.9,50.42,6.9V131.27C453.86,132.37,433.27,129.17,412.19,118.66Z"})})},q=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter(Boolean).join(" ")},O=e=>e.paypal,W=async()=>{let e=(0,h.$C)(),t=(0,h.V1)(e,"fetchCard");return(await t()).data};
1function H(){var e,t,s,n,g,b,D,Y,H,X,$,G,K,ee,et,es,ea,er,en,el;(0,k.rV)();let ei=(0,j.useRouter)(),{path:eo,flow:ed}=ei.query,{data:ec,isLoading:em}=(0,N.useQuery)("paymentMethod",W),{user:eu,userLoading:ex,userRecord:eh,subscriptionState:ep,subscriptionLoading:eg}=(0,y.useContext)(S.S),ef=L.y_.get((null==ep?void 0:null===(e=ep.subscription)||void 0===e?void 0:e.currency)||"usd").otherPlansUpdate,[eb,ev]=(0,y.useState)(eo||"account"),[ej,ey]=(0,y.useState)(!1),[ew,eN]=(0,y.useState)(!1),[eC,ek]=(0,y.useState)(""),[eS,eT]=(0,y.useState)(""),[eZ,e_]=(0,y.useState)(!1),[eE,eU]=(0,y.useState)(""),[eM,eB]=(0,y.useState)(!1),[eP,eF]=(0,y.useState)(!1),[eR,eL]=(0,y.useState)(!1),[eV,eD]=(0,y.useState)(!1),[eY,ez]=(0,y.useState)(ef[0]),[eA,eJ]=(0,y.useState)(!1),[eI,eQ]=(0,y.useState)(!1),[eq,eO]=(0,y.useState)(!1),[eW,eH]=(0,y.useState)(""),[eX,e$]=(0,y.useState)(!1),[eG,eK]=(0,y.useState)(""),[e0,e1]=(0,y.useState)(!1),[e2,e5]=(0,y.useState)(!1),[e4,e6]=(0,y.useState)(""),[e9,e8]=(0,y.useState)(!1),[e3,e7]=(0,y.useState)(!1),[te,tt]=(0,y.useState)(""),[ts,ta]=(0,y.useState)(!1),[tr,tn]=(0,y.useState)(!1),[tl,ti]=(0,y.useState)(""),[to,td]=(0,y.useState)(!1),[tc,tm]=(0,y.useState)(!1),[tu,tx]=(0,y.useState)(""),[th,tp]=(0,y.useState)(!1),[tg,tf]=(0,y.useState)(""),[tb,tv]=(0,y.useState)({complete:!1,error:{message:"Enter your card information."}}),[tj,ty]=(0,y.useState)(Array(F.bd.length).fill(!1)),[tw,tN]=(0,y.useState)(!1),[tC,tk]=(0,y.useState)(""),[tS,tT]=(0,y.useState)(""),[tZ,t_]=(0,y.useState)(function(){{let{innerWidth:e}=window;return e}}()),tE=eu&&eu.email&&(0,I.h)(eu.email),[tU,tM]=(0,y.useState)({unit:"px",x:50,y:50,width:50,height:50}),tB=(0,y.useRef)(null),tP=(0,y.useRef)(null),tF=(0,y.useRef)(null),tR=(0,y.useRef)(""),tL=(0,r.useStripe)(),tV=(0,r.useElements)(),tD=(0,N.useQueryClient)(),tY=(0,h.$C)(),tz=async()=>{eJ(!0);let e=(0,h.V1)(tY,"updateName");await e({newFirstName:eC,newLastName:eS}),await tD.invalidateQueries("user"),(0,k.Fv)(),eJ(!1),ey(!1)},tA=async e=>{e.preventDefault(),eJ(!0);let t=(0,h.$C)(),s=(0,h.V1)(t,"updateEmail"),a=await s({newEmail:eE});if(!a||!a.data){eJ(!1);return}let{data:r}=a,{error:n}=r;if(n){(0,Z.Jc)("".concat(n.message)),eJ(!1);return}await tD.invalidateQueries("user"),(0,k.Fv)(),w.ZP.success("Email Address Updated"),eJ(!1),e_(!1),await T.I8.signOut()},tJ=async e=>{e.preventDefault(),eJ(!0);let t=(0,h.V1)(tY,"sendPasswordResetEmail");try{let{data:e}=await t({email:eE});if(null==e?void 0:e.error){var s;(0,Z.Jc)("".concat(null==e?void 0:null===(s=e.error)||void 0===s?void 0:s.message).replace("FirebaseError: ","").replace("Firebase: ",""))}else w.ZP.success("Password Reset link sent!",{duration:5e3,position:"top-center"});eJ(!1)}catch(e){console.error(e),(0,Z.Jc)("".concat(e).replace("FirebaseError: ","").replace("Firebase: ","")),eJ(!1)}},tI=async()=>{eJ(!0);try{let e=(0,h.V1)(tY,"updateBio");await e({bio:eW})}catch(e){console.log(e)}await tD.invalidateQueries("user"),eJ(!1),e$(!1)},tQ=async()=>{eJ(!0);try{let e=(0,h.V1)(tY,"updateRefercode"),t=await e({code:tu});0===t.data&&(0,Z.Jc)("URL taken. Please try a different URL")}catch(e){console.log(e)}await tD.invalidateQueries("user"),eJ(!1),tp(!1)},tq=async()=>{eJ(!0);try{let e=(0,h.V1)(tY,"updateTwitter");await e({handle:eG})}catch(e){console.log(e)}await tD.invalidateQueries("user"),eJ(!1),e1(!1)},tO=async()=>{eJ(!0);try{let e=(0,h.V1)(tY,"updateInstagram");await e({handle:e4})}catch(e){console.log(e)}await tD.invalidateQueries("user"),eJ(!1),e8(!1)},tW=async()=>{eJ(!0);try{let e=(0,h.V1)(tY,"updateLinkedin");await e({handle:te})}catch(e){console.log(e)}await tD.invalidateQueries("user"),eJ(!1),ta(!1)},tH=async()=>{eJ(!0);try{let e=(0,h.V1)(tY,"updateTiktok");await e({handle:tl})}catch(e){console.log(e)}await tD.invalidateQueries("user"),eJ(!1),td(!1)},tX=async()=>{eJ(!0);let e=(0,h.V1)(tY,"updateSubscription");await e({selected:eY}),await tD.invalidateQueries("subscription"),await tD.invalidateQueries("user"),eJ(!1),eL(!1),w.ZP.success("Subscription updated",{duration:5e3,position:"top-center"})},t$=e=>{let t=new FileReader;t.addEventListener("load",()=>{var e;return tk((null===(e=t.result)||void 0===e?void 0:e.toString())||"")},{passive:!0}
1),t.readAsDataURL(e)},tG=e=>{if((null==e?void 0:e.width)&&(null==e?void 0:e.height)&&tP.current&&tF.current&&(M(tP.current,tF.current,e),eN(!1),tF.current.toBlob(e=>{if(!e)throw Error("Failed to create blob");tR.current&&URL.revokeObjectURL(tR.current);var t=new File([e],"profile-photo-"+eh.id);t||console.log("File is null"),tK(t)},"image/png")),!tF.current)throw Error("Crop canvas does not exist")},tK=async e=>{try{let t=(0,p.iH)(T.tO,"profilePhotos/".concat(e.name)),s=(0,p.B0)(t,e);s.on("state_changed",e=>{},e=>{console.error("Error uploading file: ",e)},async()=>{let e=await (0,p.Jt)(s.snapshot.ref);tT(e);let t=await eu.getIdToken(!0),a=await fetch("/api/profile-photo",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(t)},body:JSON.stringify({profilePhotoUrl:e})}),r=await a.json();a.ok||console.error("Error updating profile: ",r.message)})}catch(e){console.error("Error: ",e)}},t0=async()=>{eJ(!0);let e=(0,h.V1)(tY,"reactivateSubscription"),t=await e();if(!t||!t.data){(0,Z.Jc)("Something went wrong. Please try again."),eJ(!1);return}let{data:s}=t,{error:a}=s;
1if(a){ei.push("/subscribe"),(0,Z.Jc)(a.message),eJ(!1);return}await tD.invalidateQueries("subscription"),eJ(!1),eD(!1),w.ZP.success("Subscription Reactivated",{duration:5e3,position:"top-center"})},t1=async()=>{tN(!0);let e=tj.map((e,t)=>e?F.bd[t].name:""),t=e.filter(e=>""!==e);if(0===e.length){eJ(!1),(0,Z.Jc)("Please select at least one category.");return}let s=(0,h.V1)(tY,"savePreferences"),a=await s({preferences:t});if(!a||!a.data){eJ(!1),(0,Z.Jc)("Something went wrong. Please try again.");return}let{data:r}=a,{error:n}=r;if(n){eJ(!1),(0,Z.Jc)("".concat(n.message));return}await tD.invalidateQueries("user"),w.ZP.success("Your preferences were updated successfully.",{duration:5e3,position:"top-center"}),tN(!1)},t2=[{name:"account",current:"account"===eb},{name:"preferences",current:"preferences"===eb},{name:"refer",current:"refer"===eb},{name:"help",current:"help"===eb}],t5=e=>{ev(e.name),ei.query.path=""};(0,y.useEffect)(()=>{eh&&ek(null==eh?void 0:eh.first_name),eh&&eT(null==eh?void 0:eh.last_name),eh&&eU(null==eh?void 0:eh.email),eh&&eH(null==eh?void 0:eh.about),eh&&tx(null==eh?void 0:eh.referral_code),eh&&eK(null==eh?void 0:eh.twitter),eh&&e6(null==eh?void 0:eh.instagram),eh&&ti(null==eh?void 0:eh.tiktok),eh&&tt(null==eh?void 0:eh.linkedin),eh&&eh.preferences&&ty(F.bd.map(e=>eh.preferences.includes(e.slug)))},[eh]),(0,y.useEffect)(()=>{if(eu||ex||ei.push("/login"),ei.query.path&&(ev(ei.query.path),tZ<640)){let e=document.getElementById(String(ei.query.path));null==e||e.scrollIntoView()}(null==eu?void 0:eu.metadata.creationTime)&&tf((0,x.Z)(new Date(null==eu?void 0:eu.metadata.creationTime),"MMMM d, yyyy"))},[eb,ep,ei,eu,ex]);let t4=async e=>{tv(e),e.complete?eO(!0):eO(!1)},t6=async e=>{if(e.preventDefault(),eJ(!0),tV&&tL){if(!eq){var t,s;(null==tb?void 0:null===(t=tb.error)||void 0===t?void 0:t.message)&&(0,Z.Jc)("".concat(null==tb?void 0:null===(s=tb.error)||void 0===s?void 0:s.message)),eJ(!1);return}(0,h.V1)(tY,"updateCard")().then(async e=>{var t,s;let a=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.clientSecret,n=tV.getElement(r.CardElement);if(n){let e=await tL.confirmCardSetup(a,{payment_method:{card:n}});(null==e?void 0:e.error)&&((0,Z.Jc)("".concat(null==e?void 0:e.error.message)),eJ(!1)),(null==e?void 0:null===(s=e.setupIntent)||void 0===s?void 0:s.status)==="succeeded"&&(w.ZP.success("Your card is updated!",{duration:5e3,position:"top-center"}),await tD.invalidateQueries("paymentMethod"),eJ(!1),eQ(!1))}})}},t9=[{dataTitle:"Name",updateDataTitle:"Update",updateDataModalOpener:ey,dataDisplayText:((null==eh?void 0:eh.first_name)||"")+" "+((null==eh?void 0:eh.last_name)||"")},{dataTitle:"Email",updateDataTitle:"Update",updateDataModalOpener:e_,dataDisplayText:(null==eh?void 0:eh.email)||""}];return em||eg||ex||!eh?(0,a.jsx)("div",{className:"py-96",children:(0,a.jsx)("div",{className:"flex justify-center items-center align-middle",children:(0,a.jsxs)("svg",{role:"status",className:"inline w-16 h-16 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-red-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})}):(0,a.jsxs)("div",{className:"max-w-5xl font-mono mx-auto flex flex-col md:px-8 xl:px-0",children:[(0,a.jsxs)(f(),{children:[(0,a.jsx)("title",{children:"The Juggernaut"}),(0,a.jsx)("meta",{name:"description",content:"The South Asian stories you need to know"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsxs)("main",{className:"flex-1",children:[(null==ep?void 0:ep.status)==="isSubscribed"&&(0,a.jsx)(z,{showBoolean:eR,setShowBoolean:eL,modalTitle:"Update Subscription",icon:(0,a.jsx)(i.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsxs)(l.E,{value:eY,onChange:ez,children:[(0,a.jsx)(l.E.Label,{className:"sr-only",children:"Plan"}),(0,a.jsx)("div",{className:"space-y-4",children:ef.filter(e=>{var t,s;return e.priceId!==(null==ep?void 0:null===(s=ep.subscription)||void 0===s?void 0:null===(t=s.plan)||void 0===t?void 0:t.id)&&(tE||"Student"!==e.name)}).map(e=>(0,a.jsx)(l.E.Option,{value:e,className:e=>{let{checked:t,active:s}=e;return q(t?"border-blue-500 ring-1 ring-blue-500 bg-blue-50":"border-gray-300 bg-white","relative border rounded-lg shadow-sm px-6 py-4 cursor-pointer flex justify-between focus:outline-none")},children:t=>{let{checked:s}=t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("div",{className:"inline-flex mb-2",children:[(0,a.jsx)(l.E.Label,{as:"p",className:"font-black uppercase text-lg ".concat(s?"text-black":"text-gray-900"),children:e.name}),e.badge&&(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsx)("span",{className:"items-center mx-2 px-2.5 py-0.2 text-sm font-medium text-white bg-gradient-to-r from-purple-500 to-pink-500 rounded-md",children:e.badge})})]}),(0,a.jsxs)(l.E.Description,{as:"div",className:"sm:hidden ".concat(s?"text-black":"text-gray-500"),children:["Lifetime"!==e.name?(0,a.jsx)(J.Z,{plan:e,checked:s}):(0,a.jsx)("p",{className:"inline",children:"Choose what you pay"}),e.sub&&(0,a.jsx)("p",{className:"",children:e.sub})]}),(0,a.jsxs)(l.E.Description,{as:"div",className:"hidden sm:block ".concat(s?"text-black":"text-gray-500"),children:["Monthly"!==e.name&&(0,a.jsx)("p",{className:"inline sm:block",children:e.description}),e.sub&&(0,a.jsx)("p",{className:"inline",children:e.sub})]})]})}),(0,a.jsx)(l.E.Description,{as:"div",className:"hidden sm:block text-sm text-right",children:e.price?(0,a.jsx)(J.Z,{plan:e,checked:s,desktop:!0}):(0,a.jsx)("div",{className:"font-medium ".concat(s?"text-black":"text-gray-900"),children:"You choose"})}),(0,a.jsx)("div",{className:q(s?"border-blue-500":"border-transparent","absolute -inset-px rounded-lg pointer-events-none"),"aria-hidden":"true"})]})}},e.name))})]}),(0,a.jsx)("br",{}),(0,a.jsxs)("button",{type:"button",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:tX,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update subscription"]})]})}),(null==ep?void 0:ep.status)==="isEnding"&&(0,a.jsx)(z,{showBoolean:eV,setShowBoolean:eD,modalTitle:"Reactivate Subscription",icon:(0,a.jsx)(i.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsx)("p",{className:"text-md text-gray-500 mb-5",children:"Your subscription is scheduled to expire. We'll reactivate your subscription."}),(0,a.jsx)("button",{type:"button",className:"uppercase mb-5 inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-gray-400 text-base font-medium text-white hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 sm:text-sm",onClick:()=>eD(!1),children:"No, go back"}),(0,a.jsxs)("button",{type:"button",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:t0,children:[eA&&(0,a.jsx)(V,{}),eA?"Reactivating":"Reactivate subscription"]})]})}),(0,a.jsx)(z,{showBoolean:ej,setShowBoolean:ey,modalTitle:"Your Name",modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsx)("p",{children:"First Name"}),(0,a.jsx)("input",{id:"firstName",name:"firstName",type:"text",placeholder:"First Name",value:eC,onChange:e=>ek(e.target.value),required:!0,className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsx)("p",{children:"Last Name"}),(0,a.jsx)("input",{id:"lastName",name:"lastName",placeholder:"Last Name",type:"text",value:e
1S,onChange:e=>eT(e.target.value),required:!0,className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"button",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:tz,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update name"]})]}),icon:(0,a.jsx)(o.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})}),(0,a.jsx)(z,{showBoolean:eZ,setShowBoolean:e_,modalTitle:"Your Email",icon:(0,a.jsx)(d.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsx)("div",{className:"mt-5 sm:mt-6",children:(0,a.jsxs)("form",{onSubmit:tA,children:[(0,a.jsx)("input",{id:"email",name:"email",type:"email",value:eE,onChange:e=>eU(e.target.value),required:!0,className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update email"]})]})})}),(0,a.jsx)(z,{showBoolean:th,setShowBoolean:tp,modalTitle:"Profile URL",icon:(0,a.jsx)(c.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsx)("div",{className:"mt-5 sm:mt-6",children:(0,a.jsxs)("form",{onSubmit:tQ,children:[(0,a.jsx)("input",{id:"newReferCode",name:"newReferCode",type:"",value:tu,onChange:e=>tx(e.target.value),required:!0,className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update"]})]})})}),(0,a.jsx)(z,{showBoolean:eP,setShowBoolean:eF,modalTitle:"Reset Password",icon:(0,a.jsx)(c.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsx)("div",{className:"mt-5 sm:mt-6",children:(0,a.jsx)("form",{onSubmit:tJ,children:(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),children:[eA&&(0,a.jsx)(V,{}),eA?"Sending":"Send password reset email"]})})})}),(0,a.jsx)(z,{showBoolean:ew,setShowBoolean:eN,modalTitle:"Your Profile Photo",icon:(0,a.jsx)(o.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[tC?(0,a.jsxs)("div",{className:"max-h-[50vh] overflow-hidden mb-2",children:[(0,a.jsx)("p",{children:"Crop your image below."}),(0,a.jsx)(U.ZP,{crop:tU,onChange:e=>tM(e),aspect:1,ruleOfThirds:!0,keepSelection:!0,circularCrop:!0,children:(0,a.jsx)("img",{src:tC||eh.profile_photo_url,ref:tP})}),(0,a.jsx)("div",{className:"hidden",children:(0,a.jsx)("canvas",{ref:tF,style:{width:Math.round(null!==(en=null==tU?void 0:tU.width)&&void 0!==en?en:0),height:Math.round(null!==(el=null==tU?void 0:tU.height)&&void 0!==el?el:0)}})})]}):(0,a.jsx)("div",{}),(0,a.jsxs)("div",{className:"space-y-2",children:[tC?(0,a.jsxs)("button",{type:"button",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:()=>tG(tU),children:[eA&&(0,a.jsx)(V,{}),eA?"Saving photo":"Save Crop"]}):(0,a.jsx)(a.Fragment,{}),(0,a.jsxs)("button",{type:"button",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2  text-base font-medium  focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400 ":"bg-red-500 hover:bg-red-600","\n                  ").concat(tC?"bg-red-100/90 text-red-600 hover:bg-red-200":"bg-red-600 text-white hover:bg-red-700 ","\n                  "),onClick:()=>{var e;null===(e=tB.current)||void 0===e||e.click()},children:[eA&&(0,a.jsx)(V,{}),eA?"Selecting photo":"Select new  photo"]})]})]})}),(0,a.jsx)(z,{showBoolean:eI,setShowBoolean:eQ,modalTitle:"Your Card",icon:(0,a.jsx)(i.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsx)("div",{className:"mt-5 sm:mt-6",children:(0,a.jsxs)("form",{children:[(0,a.jsx)(r.CardElement,{onChange:t4,id:"card-element",className:"p-5 mb-5 border-2 rounded-md border-gray-300"}),(0,a.jsxs)("button",{type:"submit",className:"uppercase w-full flex justify-center py-2 px-4 border border-transparent roun
1ded-md shadow-sm text-sm font-medium text-white ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600","  focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500"),onClick:t6,disabled:eA,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating card":"Update card"]})]})})}),(0,a.jsx)(z,{showBoolean:eX,setShowBoolean:e$,modalTitle:"Your Bio",icon:(0,a.jsx)(m.Z,{className:"h-6 w-6 text-red-600","aria-hidden":"true"}),modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsx)("textarea",{id:"bio",name:"bio",maxLength:500,value:eW,onChange:e=>{eH(e.target.value),console.log(e.target.value)},className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:tI,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update bio"]})]})}),(0,a.jsx)(z,{showBoolean:e0,setShowBoolean:e1,modalTitle:"Twitter handle",icon:Q.twitter,modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsxs)("span",{className:"mt-1 mb-3 flex text-sm text-gray-900 sm:mt-0 col-span-3 rounded-md bg-blue-100 p-2",children:[(0,a.jsx)(u.Z,{height:40,color:"#1E40AF",className:"mr-2"}),"Your Twitter handle without the @ sign, e.g. bethejuggernaut"]}),(0,a.jsx)("input",{id:"twitter",name:"twitter",type:"text",maxLength:500,value:eG,onChange:e=>{eK(e.target.value),console.log(e.target.value)},className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:tq,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update"]})]})}),(0,a.jsx)(z,{showBoolean:e9,setShowBoolean:e8,modalTitle:"Instagram handle",icon:Q.instagram,modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsxs)("span",{className:"mt-1 mb-3 flex text-sm text-gray-900 sm:mt-0 col-span-3 rounded-md bg-blue-100 p-2",children:[(0,a.jsx)(u.Z,{height:40,color:"#1E40AF",className:"mr-2"}),"Your Instagram handle without the @ sign, e.g. _thejuggernaut"]}),(0,a.jsx)("input",{id:"instagram",name:"instagram",type:"text",maxLength:500,value:e4,onChange:e=>{e6(e.target.value),console.log(e.target.value)},className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:tO,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update"]})]})}),(0,a.jsx)(z,{showBoolean:ts,setShowBoolean:ta,modalTitle:"LinkedIn handle",icon:Q.linkedin,modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsxs)("span",{className:"mt-1 mb-3 flex text-sm text-gray-900 sm:mt-0 col-span-3 rounded-md bg-blue-100 p-2",children:[(0,a.jsx)(u.Z,{height:40,color:"#1E40AF",className:"mr-2"}),"Your LinkedIn public profile URL starts with https://www.linkedin.com/in"]}),(0,a.jsx)("input",{id:"linkedin",name:"linkedin",type:"text",maxLength:500,value:te,onChange:e=>{tt(e.target.value),console.log(e.target.value)},className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:tW,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update"]})]})}),(0,a.jsx)(z,{showBoolean:to,setShowBoolean:td,modalTitle:"TikTok handle",icon:Q.tiktok,modalContents:(0,a.jsxs)("div",{className:"mt-5 sm:mt-6",children:[(0,a.jsxs)("span",{className:"mt-1 mb-3 flex text-sm text-gray-900 sm:mt-0 col-span-3 rounded-md bg-blue-100 p-2",children:[(0,a.jsx)(u.Z,{height:20,color:"#1E40AF",className:"mr-2"}),"Your Tiktok handle without the @ sign"]}
1),(0,a.jsx)("input",{id:"tiktok",name:"tiktok",type:"text",maxLength:500,value:tl,onChange:e=>{ti(e.target.value),console.log(e.target.value)},className:"mb-4 justify-center w-full appearance-none block px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-red-500 focus:border-red-500 "}),(0,a.jsxs)("button",{type:"submit",className:"uppercase inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:text-sm ".concat(eA?"bg-red-400":"bg-red-500 hover:bg-red-600"),onClick:tH,children:[eA&&(0,a.jsx)(V,{}),eA?"Updating":"Update"]})]})}),(0,a.jsx)("div",{className:"relative max-w-4xl mx-auto md:px-8 xl:px-0",children:(0,a.jsx)("div",{className:"pt-10 pb-16",children:(0,a.jsx)("div",{className:"px-4 sm:px-6 md:px-0",children:(0,a.jsxs)("div",{className:"md:py-6 md:grid md:grid-cols-3 md:gap-3",children:[(0,a.jsxs)("div",{className:"text-gray-600 md:col-start-2 md:col-end-4 mb-0 mb-4",children:[(0,a.jsx)("span",{className:"text-2xl",children:"Welcome!"}),(0,a.jsx)("br",{}),(0,a.jsxs)("span",{className:"text-md",children:["You've been a member of The Juggernaut community since"," ",tg,"."]})]}),(0,a.jsx)("div",{className:"md:block hidden col-start-1 col-end-2",children:(0,a.jsx)("nav",{className:"-mb-px flex overflow-auto sm:flex-col flex flex-grow place-content-between",children:t2.map(e=>(0,a.jsx)("a",{onClick:()=>t5(e),className:q(e.current?"border-red-500 text-red-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700","whitespace-nowrap sm:py-4 py-2 px-2 border-b-4 sm:border-l-4 sm:border-b-0 font-medium text-sm cursor-pointer"),children:e.name.charAt(0).toUpperCase()+e.name.slice(1)},e.name))})}),("account"===eb||tZ<640)&&(0,a.jsxs)("div",{className:"divide-y divide-gray-200 md:col-span-2 md:col-start-2  mb-0 sm:mb-8 sm:-my-4",id:"account",children:[(0,a.jsxs)("div",{className:"flex sm:flex-row flex-col",children:[(0,a.jsxs)("div",{className:"w-full sm:mx-4 cursor-pointer flex flex-row  px-2 py-3 mb-4 sm:ml-0 justify-center border-transparent text-sm  font-medium rounded-md text-white bg-red-500 hover:bg-red-600  md:text-md",onClick:()=>ei.push("/u/"+eh.referral_code),children:[(0,a.jsx)(E.Z,{height:18,className:"pr-1"}),(0,a.jsx)("span",{children:"View my profile"})]}),"onboarding"===ed&&(0,a.jsx)(v(),{href:"/",className:"w-full sm:mx-4 cursor-pointer flex  px-2 py-3 mb-4 sm:ml-0  justify-center border-transparent text-sm  font-medium rounded-md text-white bg-blue-500 hover:bg-blue-600  md:text-md",children:(0,a.jsx)("span",{children:"Start Reading →"})})]}),(0,a.jsx)("div",{className:"sm:hidden space-y-1",children:(0,a.jsx)("h3",{className:"text-xl leading-6 font-bold text-gray-900 border-gray-800 border-t-4 py-2 ",children:"Your Profile"})}),(0,a.jsx)("div",{children:(0,a.jsxs)("dl",{className:"divide-y divide-gray-200",children:[(0,a.jsxs)("div",{className:"py-4 sm:py-5 grid grid-cols-3 sm:gap-4",children:[(0,a.jsx)("dt",{className:"text-md font-bold text-black col-span-2",children:"Customize your URL"}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[" ",(0,a.jsxs)("a",{href:"#",onClick:()=>(tp(!0),console.log("todo")),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),"Update"]})]})}),(0,a.jsxs)("dd",{className:"mt-3 flex text-sm  sm:mt-0 col-span-3",children:[(0,a.jsx)("span",{className:"text-gray-500",children:"https://www.thejuggernaut.com/u/"}),(0,a.jsx)("span",{className:"flex-grow text-gray-900",children:(null==eh?void 0:eh.referral_code)||""})]}),(0,a.jsx)("span",{className:"my-1 flex text-sm text-gray-900 sm:mt-0 col-span-3 rounded-md bg-blue-100 p-2",children:"Control where other Juggernaut subscribers can view your profile, and how you can refer friends and get rewards—all in one place."})]}),(0,a.jsxs)("div",{className:"py-4  grid grid-cols-2 sm:gap-4",children:[(0,a.jsxs)("dt",{className:"text-md font-bold text-black col-span-1",children:[(0,a.jsx)("span",{className:" sm:block hidden",children:"Profile Photo"}),(0,a.jsx)("span",{className:"sm:hidden",children:"Photo"})]}),(0,a.jsxs)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:[(0,a.jsxs)("a",{href:"#",onClick:()=>eN(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}
1),"Update"]}),(0,a.jsx)("input",{type:"file",accept:"image/*",ref:tB,onChange:e=>{let t=e.target.files&&e.target.files[0];t&&t$(t)},style:{display:"none"}})]}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1",children:(0,a.jsx)("span",{className:"flex-grow ",children:(0,a.jsx)(_.Z,{firstName:(null==eh?void 0:eh.first_name)||"",lastName:(null==eh?void 0:eh.last_name)||"",profilePhotoUrl:tS||eh.profile_photo_url,size:128,userRefercode:null==eh?void 0:eh.referral_code})})})]}),(0,a.jsxs)("div",{className:"py-4 sm:py-5 grid grid-cols-2 sm:gap-4",children:[(0,a.jsx)("dt",{className:"text-md font-bold text-black col-span-1",children:"Your bio"}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[" ",(0,a.jsxs)("a",{href:"#",onClick:()=>e$(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),"Update"]})]})}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1",children:(0,a.jsx)("span",{className:"flex-grow",children:(null==eh?void 0:eh.about)||""})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-md font-bold text-black sm:pt-5",children:"Social"}),(0,a.jsx)("div",{className:"text-sm italic text-black mb-4 ",children:"Where can other readers find you?"}),(0,a.jsxs)("div",{className:"pb-4 sm:pb-5 grid grid-cols-2 sm:gap-0 ",children:[(0,a.jsx)("dt",{className:"text-sm mr-4 font-medium text-gray-900 col-span-1",children:"Twitter"}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("a",{href:"#",onClick:()=>e1(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),"Update"]})}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm  sm:mt-0 col-span-1",children:eh.twitter?(0,a.jsx)("span",{className:"flex-grow",children:eh.twitter}):(0,a.jsx)("span",{className:"flex-grow text-gray-500",children:eh.twitter||"Twitter handle"})})]}),(0,a.jsxs)("div",{className:"pb-4 sm:pb-5 grid grid-cols-2 sm:gap-0 ",children:[(0,a.jsx)("dt",{className:"text-sm mr-4 font-medium text-gray-900 col-span-1",children:"LinkedIn"}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("a",{href:"#",onClick:()=>ta(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),"Update"]})}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm  sm:mt-0 col-span-1",children:eh.linkedin?(0,a.jsx)("span",{className:"flex-grow",children:eh.linkedin}):(0,a.jsx)("span",{className:"flex-grow text-gray-500",children:eh.linkedin||"LinkedIn public profile URL"})})]}),(0,a.jsxs)("div",{className:"pb-4 sm:pb-5 grid grid-cols-2 sm:gap-0 ",children:[(0,a.jsx)("dt",{className:"text-sm mr-4 font-medium text-gray-900 col-span-1",children:"Instagram"}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("a",{href:"#",onClick:()=>e8(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),"Update"]})}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm  sm:mt-0 col-span-1",children:eh.instagram?(0,a.jsx)("span",{className:"flex-grow",children:eh.instagram}):(0,a.jsx)("span",{className:"flex-grow text-gray-500",children:eh.instagram||"Instagram handle"})})]}),(0,a.jsxs)("div",{className:"pb-4 sm:pb-5 grid grid-cols-2 sm:gap-0 ",children:[(0,a.jsx)("dt",{className:"text-sm mr-4 font-medium text-gray-900 col-span-1",children:"TikTok"}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("a",{href:"#",onClick:()=>td(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),"Update"]})}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm  sm:mt-0 col-span-1",children:eh.tiktok?(0,a.jsx)("span",{className:"flex-grow",children:eh.tiktok}):(0,a.jsx)("span",{className:"flex-grow text-gray-500",children:eh.tiktok||"TikTok handle"})})]})]}),t9.map(e=>(0,a.jsxs)("div",{className:"py-4 sm:py-5 grid grid-cols-2 sm:gap-4",children:[(0,a.jsx)("dt",{className:"text-md font-bold text-black col-span-1",children:e.dataTitle}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("a",{href:"#",onClick:()=>e.updateDataModalOpener(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),e.updateDataTitle]})}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1",children:(0,a.jsx)("span",{className:"flex-grow",children:e.dataDisplayText})})]},e.dataTitle)),(0,a.jsxs)("div",{className:"py-4 sm:py-5 grid grid-cols-2 sm:gap-4",children:[(0,a.jsx)("dt",{className:"text-md font-bold text-black col-span-1",children:"Password"}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("a",{className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",href:"#",onClick:()=>eF(!0),children:[(0,a.jsx)(B.Z,{height:18}
1),"Update"]})}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1",children:(0,a.jsx)("span",{className:"flex-grow",children:"********"})})]}),(0,a.jsxs)("div",{className:"py-4 sm:py-5 grid grid-cols-2 sm:gap-0",children:["paypal"===ep.type&&(0,a.jsx)("span",{className:"my-1 flex text-sm text-gray-900 sm:mt-0 col-span-2 rounded-md bg-yellow-100 p-2",children:"Please make any account changes via this page to ensure you're synced with our systems."}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("dt",{className:"text-md font-bold text-black mb-4",children:"Your Subscription"}),"stripe"===ep.type&&(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1",children:(0,a.jsx)("span",{className:"flex-grow",children:(null==ep?void 0:ep.subscription)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"mr-1",children:(0,L.nz)(null==ep?void 0:null===(t=ep.subscription)||void 0===t?void 0:t.plan)}),(null==ep?void 0:ep.status)==="isSubscribed"&&!((null==ep?void 0:null===(n=ep.subscription)||void 0===n?void 0:null===(s=n.plan)||void 0===s?void 0:s.id)==="lifetime"||(null==ep?void 0:null===(b=ep.subscription)||void 0===b?void 0:null===(g=b.plan)||void 0===g?void 0:g.id)==="international_lifetime")&&(0,a.jsxs)("span",{className:"mr-2",children:[(0,a.jsx)("br",{}),"Renews"," ",(0,x.Z)(new Date((null==ep?void 0:null===(D=ep.subscription)||void 0===D?void 0:D.current_period_end)*1e3),"MMMM d, yyyy")]}),(null==ep?void 0:null===(Y=ep.subscription)||void 0===Y?void 0:Y.cancel_at_period_end)&&(0,a.jsxs)("span",{className:"mr-2",children:[(0,a.jsx)("br",{}),"Ending"," ",(0,x.Z)(new Date((null==ep?void 0:null===(H=ep.subscription)||void 0===H?void 0:H.cancel_at)*1e3),"MMMM d, yyyy")]})]}):(0,a.jsx)(v(),{href:"/subscribe",className:"text-red-500 hover:text-red-700",children:"Subscribe now"})})}),"paypal"===ep.type&&(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1 ",children:(0,a.jsx)("span",{className:"flex-grow",children:(null==ep?void 0:ep.subscription)?(0,a.jsx)(a.Fragment,{children:null===(X=ef.find(e=>{var t;return O(e)===(null==ep?void 0:null===(t=ep.subscription)||void 0===t?void 0:t.plan_id)}))||void 0===X?void 0:X.name}):(0,a.jsx)(v(),{href:"/subscribe",className:"text-red-500 hover:text-red-700",children:"Subscribe now"})})}),"appstore"===ep.type&&(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1",children:(0,a.jsx)("span",{className:"flex-grow",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"mr-1",children:"App Store Subscription"}),(null==ep?void 0:ep.status)==="isSubscribed"&&(null==ep?void 0:null===(G=ep.subscription)||void 0===G?void 0:null===($=G.plan)||void 0===$?void 0:$.id)!=="lifetime"&&(0,a.jsxs)("span",{className:"mr-2",children:[(0,a.jsx)("br",{}),"Manage in the App Store"]}),(null==ep?void 0:null===(K=ep.subscription)||void 0===K?void 0:K.cancel_at_period_end)&&(0,a.jsxs)("span",{className:"mr-2",children:[(0,a.jsx)("br",{}),"Ending"," ",(0,x.Z)(new Date((null==ep?void 0:null===(ee=ep.subscription)||void 0===ee?void 0:ee.cancel_at)*1e3),"MMMM d, yyyy")]})]})})})]}),"needsToSubscribe"===ep.status&&(0,a.jsx)(v(),{href:"/subscribe",className:"text-red-500 hover:text-red-700 col-span-1",children:"Subscribe now"}),(0,a.jsx)("dd",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end flex-col place-items-end",children:(0,a.jsxs)(a.Fragment,{children:[(null==ep?void 0:ep.status)==="isSubscribed"&&"stripe"===ep.type&&(0,a.jsxs)("a",{href:"#",onClick:()=>eL(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}),"Update Plan"]}),(null==ep?void 0:ep.status)==="isEnding"&&(0,a.jsx)("a",{href:"#",onClick:()=>eD(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:"Reactivate Subscription"}),(null==ep?void 0:ep.status)==="needsToRestart"&&(0,a.jsx)(v(),{href:"/subscribe",className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:"Restart Subscription"}),(null==ep?void 0:ep.status)==="isSubscribed"&&(null==ep?void 0:null===(es=ep.subscription)||void 0===es?void 0:null===(et=es.plan)||void 0===et?void 0:et.id)!=="lifetime"&&"appstore"!==ep.type&&(0,a.jsx)("div",{className:"mt-1 flex text-sm text-gray-900 sm:mt-0 ",children:(0,a.jsxs)("a",{href:"#",onClick:()=>{(0,k.i7)({user:eu}),ei.push("/cancel")},className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(P.Z,{height:18}),"Cancel Subscription"]})})]})})]}),(null==ec?void 0:ec.card.card)&&(0,a.jsxs)("div",{className:"py-4 sm:py-5 grid grid-cols-2 sm:gap-0 sm:pt-5",children:[(0,a.jsx)("dt",{className:"text-sm mr-4 font-medium text-gray-900 col-span-1",children:"Card"}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm text-gray-900 sm:mt-0 col-span-1 place-content-end",children:(0,a.jsxs)("a",{href:"#",onClick:()=>eQ(!0),className:"text-red-500 hover:text-red-700 cursor-pointer flex flex-row underline",children:[(0,a.jsx)(B.Z,{height:18}
1),"Update Card"]})}),(0,a.jsx)("dd",{className:"mt-0 flex text-sm text-gray-900 sm:mt-0 col-span-1",children:(0,a.jsx)("span",{className:"flex-grow",children:"xxxx-xxxx-xxxx-".concat(null==ec?void 0:null===(er=ec.card)||void 0===er?void 0:null===(ea=er.card)||void 0===ea?void 0:ea.last4)||0})})]})]})})]}),("preferences"===eb||tZ<640)&&(0,a.jsxs)("div",{className:"mt-4 divide-y divide-gray-200 md:col-span-2 my-8 sm:-my-4 preferences",id:"preferences",children:[(0,a.jsx)("div",{className:"sm:hidden space-y-1",children:(0,a.jsx)("h3",{className:"text-xl leading-6 font-bold text-gray-900 border-gray-800 border-t-4 py-2",children:"Your Preferences"})}),(0,a.jsxs)("div",{className:"px-4 sm:px-6 md:px-0 pt-4",children:[(0,a.jsx)("p",{className:" text-md font-bold text-black",children:"What types of stories are you most interested in?"}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("fieldset",{className:"space-y-5",children:[(0,a.jsx)("legend",{className:"sr-only",children:"Categories"}),F.bd.map(e=>(0,a.jsxs)("div",{className:"relative flex items-start",children:[(0,a.jsx)("div",{className:"flex h-5 items-center",children:(0,a.jsx)("input",{id:e.name,"aria-describedby":e.name,name:e.name,type:"checkbox",checked:tj[e.id-1],onChange:t=>{ty(tj.map((s,a)=>a===e.id-1?t.target.checked:s))},className:"h-4 w-4 rounded border-gray-300 text-red-600 focus:ring-red-500"})}),(0,a.jsx)("div",{className:"ml-3 text-base",children:(0,a.jsx)("label",{htmlFor:e.name,className:"font-medium text-gray-700",children:e.name})})]},e.id))]}),(0,a.jsx)("div",{className:"mt-6",children:(0,a.jsx)(C.Z,{loading:tw,disabled:tj.every(e=>!e),action:t1,text:"Update preferences",color:"red"})})]})]})]}),("refer"===eb||tZ<640)&&(0,a.jsxs)("div",{className:"col-span-2 sm:-mt-10 my-8 divide-y divide-gray-200 -mb-0 sm:mb-0 refer",id:"refer",children:[(0,a.jsx)("div",{className:"sm:hidden space-y-1 sm:mb-4",children:(0,a.jsx)("h3",{className:"text-xl leading-6 font-bold text-gray-900 border-gray-800 border-t-4 -mb-6 sm:mb-0 py-2",children:"Refer"})}),(0,a.jsx)("br",{}),(0,a.jsx)(A.default,{})]}),("help"===eb||tZ<640)&&(0,a.jsxs)("div",{className:"col-span-2 my-0 sm:my-0 divide-y divide-gray-200 sm:-mt-4 help",id:"help",children:[(0,a.jsx)("div",{className:"sm:hidden space-y-1",children:(0,a.jsx)("h3",{className:"text-xl leading-6 font-bold text-gray-900 border-gray-800 border-t-4 py-2",children:"Help"})}),(0,a.jsx)(R,{})]})]})})})})]})]})}let X=(0,n.J)("pk_live_NV0W9TXM7GXvwvadB0w0chpc");function $(){return(0,a.jsx)(r.Elements,{stripe:X,options:{mode:"setup",currency:"usd",appearance:{theme:"stripe"}},children:(0,a.jsx)(H,{})})}}},function(e){e.O(0,[1372,614,5675,458,1032,2743,2888,9774,179],function(){return e(e.s=52837)}),_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.