1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6646],{54755:function(e,t,r){var n=r(59499),s=r(4730),a=r(14611),o=r(86010),i=(r(67294),r(85893)),l=["variant","disabled","onClick","children","loading"];function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=function(e){var t=e.variant,r=e.disabled,n=void 0!==r&&r,c=e.onClick,d=e.children,m=e.loading,x=(0,s.Z)(e,l);return"primary"===t?(0,i.jsx)("button",u(u({},x),{},{className:(0,o.default)("cursor-pointer self-center rounded-full border border-brandColor-skin-teal bg-brandColor-skin-teal px-4 py-1.5 text-xs text-white",x.className,(n||m)&&"cursor-not-allowed opacity-30"),onClick:c,disabled:n||m,children:m?(0,i.jsx)(a.Z,{color:"white",height:4,width:4}):d})):"secondary"===t?(0,i.jsx)("button",u(u({},x),{},{className:(0,o.default)("cursor-pointer self-center rounded-full border border-brandColor-skin-teal bg-backgroundColor-skin-secondary px-4 py-1.5 text-xs text-textColor-skin-brand",x.className,(n||m)&&"cursor-not-allowed opacity-30"),onClick:c,disabled:n||m,children:m?(0,i.jsx)(a.Z,{height:4,width:4}):d})):"tertiary"===t?(0,i.jsx)("button",u(u({},x),{},{className:(0,o.default)("cursor-pointer self-center rounded-full border border-borderColor-skin-secondary bg-backgroundColor-skin-secondary px-4 py-1.5 text-xs text-textColor-skin-secondary",x.className,(n||m)&&"cursor-not-allowed opacity-30"),onClick:c,disabled:n||m,children:m?(0,i.jsx)(a.Z,{height:4,width:4}):d})):"danger"===t?(0,i.jsx)("button",u(u({},x),{},{className:(0,o.default)("cursor-pointer self-center rounded-full border border-textMessageColor-skin-error px-4 py-1.5 text-xs text-textMessageColor-skin-error",x.className,(n||m)&&"cursor-not-allowed opacity-30"),onClick:c,disabled:n||m,children:m?(0,i.jsx)(a.Z,{color:"white",height:4,width:4}):d})):(0,i.jsx)("button",u(u({},x),{},{className:(0,o.default)(x.className,"cursor-pointer text-sm",(n||m)&&"cursor-not-allowed opacity-30"),onClick:c,disabled:n||m,children:m?(0,i.jsx)(a.Z,{color:"white",height:4,width:4}):d}))};d.defaultProps={disabled:!1},t.Z=d},26606:function(e,t,r){r.d(t,{Z:function(){return n.Z}});var n=r(54755)},61317:function(e,t,r){var n=r(67294);t.Z=function(e,t){var r=(0,n.useRef)(function(){try{var r=window.sessionStorage.getItem(e);return r?JSON.parse(r):t}catch(n){return console.log(n),t}}());return[r.current,function(t){try{var n=t instanceof Function?t(r.current):t;r.current=n,window.sessionStorage.setItem(e,JSON.stringify(n))}catch(s){console.log(s)}}]}},52104:function(e,t,r){r(67294);var n=r(48395),s=r(85893);t.Z=function(e){var t=e.handleSubmit,r=e.text,a=e.variant,o=e.setEmail,i=e.email,l=(0,n.Z)().isMobile;return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("form",{className:"flex h-[36px] justify-between rounded-full border border-borderColor-skin-primary bg-backgroundColor-skin-primary ".concat(i.length>0&&"border-2 border-borderColor-skin-brand"),children:[(0,s.jsx)("input",{onChange:function(e){var t=e.target.value.toLowerCase().replace(/\s/g,"");o(t)},type:"text",placeholder:"Enter your email address",maxLength:100,value:i,className:"placeholder-textColor-border-secondary w-full rounded-l-full border border-r-0 border-none border-borderColor-skin-primary bg-backgroundColor-skin-primary px-3 text-textColor-skin-primary outline-none hover:!border-b-2 hover:!border-borderColor-skin-secondary focus:!border-b-2 focus:!border-borderColor-skin-brand focus:outline-none"}),(0,s.jsx)("button",{className:"h-[36px] whitespace-nowrap\n ".concat(l?"w-[85px] text-sm":"w-[108px]"," ").concat("article"===a?"rounded-l-0":"rounded-l-full"," cursor-pointer self-center rounded-r-full border border-brandColor-skin-teal bg-brandColor-skin-teal px-4 py-1.5 text-xs text-white ").concat(0===i.length&&"cursor-not-allowed opacity-30"),onClick:t,disabled:0===i.length,type:"submit",children:r})]})})}},29511:function(e,t,r){var n=r(59499),s=r(50029),a=r(16835),o=r(87794),i=r.n(o),l=r(67294),c=(r(25675),r(86426)),u=r(86501),d=r(85945),m=r(11163),x=r(48395),p=r(77566),h=r(41705),f=r(4987),g=r(93077),b=r(34572),y=r(41003),v=r(85377),j=r(14876),w=r(86686),k=r(77555),C=r(65483),N=r(61317),S=r(92836),I=r(78208),P=r(85893);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?O(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Z=function(e){var t,r=e.isShort,n=e.setIsModalOpen,o=e.source,O=e.authFeature,Z=e.btnWidth,F=e.wrapperClassName,E=(0,x.Z)().isMobile,_=(0,p.p)(),A=_.openSuccessToast,D=_.openErrorToast,T=(0,d.NL)(),Q=(0,m.useRouter)(),L=(0,b.E)(),q=L.setLoggedInUser,K=L.setAuthVerified,U=(0,I.Z)().setHasFiredConfetti,V=(0,N.Z)("authAction",null),W=(0,a.Z)(V,1)[0];t=O!==S.E6.default||[0,1,4,7].includes(W)?W:O;var H=(0,N.Z)("authPayload",null),R=(0,a.Z)(H,1)[0],B=(0,v.HW)({subscriptionData:R,customConfig:{onSuccess:function(){T.invalidateQueries(["newsletter-metadata"]),n(!1),T.invalidateQueries(v.fc.getNewsletterMetaQuery({newsletterId:R.publicationId})),T.invalidateQueries(),E?u.Am.success("Subscription successful!",{icon:(0,P.jsx)(h.Z,{})}):A({title:"Subscription successful!",subtitle:"You can view all your subscriptions through your profile."})}}}).mutate,Y=(0,f.ti)({userId:R,customConfig:{onMutate:function(){var e=(0,s.Z)(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,T.cancelQueries(f.SW.getUserMetaDataQueryKey({userId:R}));case 2:return t=T.getQueryData(f.SW.getUserMetaDataQueryKey({userId:R})),T.setQueryData(f.SW.getUserMetaDataQueryKey({userId:R}),(function(e){return M(M({},e),{},{isFollowed:!0})})),e.abrupt("return",{previousMetaData:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onError:function(e,t,r){T.setQueryData(f.SW.getUserMetaDataQueryKey({userId:R}),r.previousMetaData)},onSuccess:function(){},onSettled:function(){T.invalidateQueries(f.SW.getUserMetaDataQueryKey({userId:R}))}}}),G=Y.mutate,z=(0,j.Ty)().mutate,J=(0,w.Kb)({topicId:R,customConfig:{onSuccess:function(){T.invalidateQueries(w.sM.getTopicMetaDataQueryKey({topicId:R}
1)),T.invalidateQueries(k.sn.getDiscoverTopicsQueryKey)}}}).mutate,X=(0,v.AA)({customConfig:{onSuccess:function(e){var t=e.url;t&&(window.location.href=t)},onError:function(e){var t;D({title:"Subscription failed",subtitle:(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data.errorMessage)||"Something went wrong"})}}}).mutate,$=(0,v._8)({customConfig:{onSuccess:function(){U((function(e){return e+1})),A({title:"Subscribed",subtitle:"You have successfully subscribed to the newsletter"})},onError:function(e){var t;D({title:"Subscription failed",subtitle:(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data.errorMessage)||"Something went wrong"})}}}).mutate;var ee=(0,g._K)({source:o,customConfig:{onSuccess:function(e){try{var r={avatar:e.avatar,email:e.email,fullName:e.fullName,headline:e.headline,role:e.role,id:e.sub,userName:e.userName};sessionStorage.removeItem("accessingMemberId"),(0,y.kT)("accessingMemberId"),q(r),K(!0),(0,C.qe)("sign-in-success",{userAgent:window.navigator.userAgent,login_option:"google",userId:e.sub}),(0,y.yL)("isAuthenticated","true",2592e6),function(){switch(t){case 0:default:break;case 1:G(R);break;case 2:B();break;case 3:z(R);break;case 4:J(R);break;case 11:$(R);break;case 12:X(R)}}(),n(!1),sessionStorage.removeItem("authAction"),sessionStorage.removeItem("authPayload")}catch(s){console.log(s)}},onError:function(e){var t,r,n,s;D({title:"Oops!",subtitle:null!==(t=null===e||void 0===e||null===(r=e.response)||void 0===r||null===(n=r.data)||void 0===n?void 0:n.errorMessage)&&void 0!==t?t:"Something went wrong"}),(0,C.qe)("sign-in-failure",{userAgent:window.navigator.userAgent,login_option:"google",failure_reason:null===e||void 0===e||null===(s=e.response)||void 0===s?void 0:s.data.errorMessage})}}}).mutate;var te=(0,l.useMemo)((function(){return Z||(r?"50":E?"310":"368")}),[Z,E,r]);return(0,P.jsx)("div",{className:"flex !h-9 min-w-[50px] items-center overflow-hidden rounded-full border border-borderColor-skin-primary ".concat(F),children:(0,P.jsx)(c.kZ,{auto_select:!1,onSuccess:function(e){!function(e){"tokenId"in e&&ee({idToken:e.tokenId,refId:Q.query.refId,utm_adset:Q.query.utm_adset,utm_campaign:Q.query.utm_campaign,utm_content:Q.query.utm_content,utm_medium:Q.query.utm_medium,utm_source:Q.query.utm_source})}(M(M({},e),{},{tokenId:e.credential}))},onError:function(){},shape:"pill",type:r?"icon":"standard",theme:"outline",width:Number.isNaN(Number(te))?300:Number(te),text:"continue_with"})})};Z.defaultProps={isShort:!1,setIsModalOpen:null,source:null,authFeature:null,wrapperClassName:"",btnWidth:null},t.Z=Z},14468:function(e,t,r){r.d(t,{Z:function(){return m}});var n=r(16835),s=r(67294),a=r(25675),o=r.n(a),i=r(11163),l=r(48395),c=r(91961),u=r(10896),d=r(85893);function m(e){var t=e.isIconOnly,r=e.authorId,a=e.planId,m=e.onClick,x=e.redirectUri,p=e.showPendingInvites,h=e.style,f=e.isShort,g=(0,i.useRouter)(),b=(0,l.Z)().isMobile,y=(0,c.Z)("linkedin-show-pending-invites",!1),v=(0,n.Z)(y,3),j=v[1],w=v[2],k=(0,s.useRef)();(0,s.useEffect)((function(){localStorage.setItem("linkedin-redirect",null!==x&&void 0!==x?x:g.asPath),localStorage.setItem("linkedin-subscriber-author-id",r),localStorage.setItem("linkedin-subscriber-plan-id",a),p&&j(!0);var e,t={response_type:"code",client_id:"78kel0j2l4azy0",redirect_uri:"https://tealfeed.com/linkedin/confirm",encoded_redirect_uri:encodeURIComponent("https://tealfeed.com/linkedin/confirm"),scope:"r_liteprofile%20r_emailaddress"};(k.current="https://www.linkedin.com/oauth/v2/authorization?response_type=".concat(t.response_type,"&client_id=").concat(t.client_id,"&redirect_uri=").concat(t.encoded_redirect_uri,"&scope=").concat(t.scope),document.querySelector("#linkedin-login"))&&(null===(e=document.querySelector("#linkedin-login"))||void 0===e||e.addEventListener("click",(function(e){return e.preventDefault(),window.open(k.current,"_self"),!1})));return function(){w()}}),[]);return t?(0,d.jsx)("div",{className:"mx-2 h-12 w-12 cursor-pointer self-center",id:"linkedin-login",children:(0,d.jsx)("div",{className:"h-12 w-12",children:(0,d.jsx)(o(),{src:"/LinkedinNew.svg",alt:"linkedin-login",width:48,height:48,className:"ml-2"})})}):(0,d.jsxs)("div",{onClick:function(e){e.preventDefault(),m(e),localStorage.setItem("authAction",sessionStorage.getItem("authAction")),localStorage.setItem("authPayload",sessionStorage.getItem("authPayload")),localStorage.setItem("linkedin-redirect",g.asPath),document.querySelector("#linkedin-login")&&window.open(k.current,"_self")},className:"flex h-[36px] w-full cursor-pointer items-center justify-center rounded-full border border-borderColor-skin-primary bg-blue-linkedin text-textColor-skin-primary",id:"linkedin-login",style:h,children:[(0,d.jsx)("div",{children:(0,d.jsx)(o(),{src:"/LinkedIn.svg",alt:"linkedin-login",width:b?12:14,height:b?12:14})}),(0,d.jsx)("div",{children:(0,d.jsx)(u.Z,{condition:!f,children:(0,d.jsx)("p",{className:"self-center pl-2 font-medium text-white ".concat(b?"text-xs":"text-sm"),children:"Continue With LinkedIn"})})})]})}m.defaultProps={isIconOnly:!1,authorId:null,planId:null,redirectUri:"/",showPendingInvites:!1,style:null,isShort:!1}},86646:function(e,t,r){r.d(t,{Z:function(){return De}});var n,s,a=r(56697),o=r(59499),i=r(50029),l=r(16835),c=r(87794),u=r.n(c),d=r(67294),m=r(25675),x=r.n(m),p=r(11163),h=r(85945),f=r(92836),g=r(41664),b=r.n(g),y=r(86010),v=r(48395);function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j.apply(this,arguments)}var w=function(e){return d.createElement("svg",j({width:14,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n||(n=d.createElement("path",{d:"M7 .333C3.335.333.335 3.333.335 7c0 3.666 3 6.666 6.667 6.666 3.666 0 6.666-3 6.666-6.666 0-3.667-3-6.667-6.666-6.667zm-1.333 10L2.334 7l.94-.94 2.393 2.386 5.06-5.06.94.947-6 6z",fill:"url(#checkv2_svg__paint0_linear_168_13973)"})),s||(s=d.createElement("defs",null,d.createElement("linearGradient",{id:"checkv2_svg__paint0_linear_168_13973",x1:-5.099,y1:-8.104,x2:17.599,y2:14.25,gradientUnits:"userSpaceOnUse"},d.createElement("stop",{stopColor:"#2FDD92"}),d.createElement("stop",{offset:1,stopColor:"#2F86A6"})))))},k=r(85893);function C(e){var t=(0,v.Z)().isMobile;return function(){switch(e.authFeature){case f.E6.default:return(0,k.jsx)("div",{className:" h-full w-full rounded-r-2xl bg-[#0080800A] bg-opacity-40 py-20 ",children:(0,k.jsxs)("div",{className:"px-4 text-center md:block",children:[(0,k.jsx)("div",{className:"",children:(0,k.jsx)(x(),{src:"".concat("https://cdn.tealfeed.com","/assets/publications/ui/login.svg"),alt:"career-background",width:t?342:240,height:t?228:240,className:"pt-6"})}),(0,k.jsxs)("div",{className:"px-9",children:[(0,k.jsx)("div",{className:"mt-2 flex items-center justify-center",children:(0,k.jsxs)("h1",{className:"text-2xl font-medium text-textColor-skin-primary",children:[e.authType===f.Gr.login?"Welcome Back to ":"Welcome to ",(0,k.jsx)("span",{className:"text-textColor-skin-brand",children:"Teal"}),"feed\ud83d\udc4b"]})}),(0,k.jsx)("p",{className:"mt-1 text-sm leading-[22.4px] text-textColor-skin-primary",children:"Set up your practice for success with one tool that lets you automate operations, make data-driven decisions, build a strong brand presence and more."})]})]})});case f.E6.connect:return(0,k.jsx)("div",{className:" h-full w-full rounded-r-2xl bg-[#0080800A] bg-opacity-40 py-20 ",children:(0,k.jsxs)("div",{className:"px-4 text-center md:block",children:[(0,k.jsx)("div",{className:"",children:(0,k.jsx)(x(),{src:"".concat("https://cdn.tealfeed.com","/assets/publications/ui/connect.svg"),alt:"career-background",width:t?342:240,height:t?228:240,className:"pt-4"})}),(0,k.jsxs)("div",{className:"px-6",children:[(0,k.jsx)("div",{className:"mt-2 flex items-center justify-center ",children:(0,k.jsx)("h1",{className:"text-2xl font-medium text-textColor-skin-primary",children:"Connect with Me \ud83d\udc4b"})}),(0,k.jsxs)("div",{className:"font-base flex-col items-center pt-2",children:[(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:"text-textColor-skin-secondary",children:"Find and Connect with more industry standards"})]}),(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:" text-textColor-skin-secondary",children:"Schedule 1:1 Sessions and Manage Bookings."})]}),(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:" text-textColor-skin-secondary",children:"Discover Personalised Content"})]})]})]})]})});case f.E6.newsletter:return(0,k.jsx)("div",{className:" h-full w-full rounded-r-2xl bg-[#0080800A] bg-opacity-40 py-20 ",children:(0,k.jsxs)("div",{className:"px-4 text-center md:block",children:[(0,k.jsx)("div",{className:"",children:(0,k.jsx)(x(),{src:"".concat("https://cdn.tealfeed.com","/assets/publications/ui/subscribe.svg"),alt:"career-background",width:t?342:240,height:t?228:240,className:"pt-4"})}),(0,k.jsxs)("div",{className:"px-8",children:[(0,k.jsx)("div",{className:"mt-2 flex items-center justify-center ",children:(0,k.jsx)("h1",{className:" text-2xl font-medium text-textColor-skin-primary",children:"Subscribe to my Newsletter\ud83d\udc4b"})}),(0,k.jsxs)("div",{className:"flex-col items-center pt-2 text-base",children:[(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:" text-textColor-skin-secondary",children:"Get notified whenever I publish something"})]}),(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:" text-textColor-skin-secondary",children:"No spam. Maximum 1 email per week"})]}),(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:" text-textColor-skin-secondary",children:"Access to my exclusive articles"})]})]})]})]})});case f.E6.forgotPassword:return(0,k.jsx)("div",{className:" h-full w-full rounded-r-2xl bg-[#0080800A] bg-opacity-40 py-20 ",children:(0,k.jsxs)("div",{className:"px-4 text-center md:block",children:[(0,k.jsx)("div",{className:"",children:(0,k.jsx)(x(),{src:"".concat("https://cdn.tealfeed.com","/assets/publications/ui/forgot-password.svg"),alt:"career-background",width:t?342:240,height:t?228:240,className:"pt-4"})}),(0,k.jsx)("div",{className:"mt-2 flex items-center justify-center ",children:(0,k.jsx)("h1",{className:"text-2xl font-medium text-textColor-skin-primary",children:e.isForgotPasswordEnabled?"Forgot Password?":"Set Your Password"})}),(0,k.jsx)("div",{className:"flex-col items-center px-4 pt-2 text-sm text-textColor-skin-primary",children:"You can use your email address to reset your password. You'll receive an OTP that will help you to set a new password for your Tealfeed account"})]})});default:return(0,k.jsxs)("div",{className:" hidden w-full rounded-r-2xl bg-green-300 bg-opacity-70 px-4 text-center md:block",children:[(0,k.jsx)("div",{className:"",children:(0,k.jsx)(x(),{src:"/Assets/about1.png",alt:"career-background",width:t?342:240,height:t?228:240,className:"pt-4"})}),(0,k.jsxs)("div",{className:"mt-2 flex items-center justify-center ",children:[(0,k.jsx)("h1",{className:(0,y.default)(t?"text-2xl":"text-xl","text-textColor-skin-primary"),children:"Welcome to"}),(0,k.jsx)(b(),{href:"/",children:(0,k.jsx)(x(),{src:"/Assets/logo.png",alt:"cft",width:t?110:94,height:t?32:28,className:"cursor-pointer"})})]}),(0,k.jsx)("p",{className:" text-textColor-skin-secondary",children:"Set up your practice for success with one tool that lets you automate operations, make data-driven decisions, build a strong brand presence and more."})]})}}()}var N=C;C.defaultProps={isForgotPasswordEnabled:!0};
1var S,I=r(74253),P=r(4511),O=r(29511),M=r(14468),Z=r(51222),F=r(93077),E=r(86631),_=r(10896),A=r(51024),D=r(71470),T=r(86501),Q=r(14611);function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(this,arguments)}var q=function(e){return d.createElement("svg",L({width:8,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),S||(S=d.createElement("path",{d:"M7.5 13.099l-6.25-6.22L7.5.656",stroke:"#686868",strokeLinecap:"round",strokeLinejoin:"round"})))},K=r(99611),U=r(90420),V=r(26606);var W=function(e){var t=e.email,r=e.otp,n=e.setOtp,s=e.setStep3,a=(0,d.useState)(!1),o=a[0],i=a[1],l=(0,v.Z)().isMobile,c=(0,d.useState)(3),u=c[0],m=c[1],x=(0,d.useState)(0),p=x[0],h=x[1],f=(0,F.GK)().mutate,g=(0,F.Pi)({customConfig:{onSuccess:function(){s(!0)},onError:function(){i(!0)}}}),b=g.mutate,y=g.isLoading;return(0,d.useEffect)((function(){var e=setInterval((function(){p>0&&h(p-1),0===p&&(0===u?clearInterval(e):(h(59),m(u-1)))}),1e3);return function(){clearInterval(e)}}),[u,p]),(0,k.jsxs)("div",{className:"h-full ".concat(l?"px-4":"px-20"," text-center"),children:[(0,k.jsx)("h1",{className:"".concat(l?"text-lg":"mt-[6.1rem] text-xl"," font-medium text-textColor-skin-primary"),children:"OTP Verification"}),(0,k.jsxs)("p",{className:"mb-4 mt-1 text-sm text-textColor-skin-secondary",children:["A 6 digit verification code has been sent to your email"," ",(0,k.jsx)("span",{className:"text-textColor-skin-primary",children:t})]}),(0,k.jsx)(D.Z,{value:r,onChange:function(e){o&&i(!1),n(e)},numInputs:6,isInputNum:!0,inputStyle:{height:40,width:40,borderRadius:10,background:"var(--hover-background)",color:"var(--text-primary)",border:o?"1px solid var(--text-error)":"1px solid var(--border-primary)"},containerStyle:{display:"flex",gap:"10px",alignItems:"center",width:"100%",justifyContent:"space-between"},shouldAutoFocus:!0}),(0,k.jsx)("div",{className:"".concat(l?"mb-4 mt-2":"my-4"," text-left text-textColor-skin-light"),children:(0,k.jsxs)("p",{className:"w-max ".concat(0===p&&0===u?"cursor-pointer text-textColor-skin-brand":"cursor-not-allowed text-textColor-skin-secondary"),onClick:function(){0===u&&0===p&&(f({email:t}),m(3))},children:["Resend Code",(0,k.jsx)(_.Z,{condition:0!==u||0!==p,children:(0,k.jsxs)(k.Fragment,{children:["\xa0(",u<10?"0".concat(u):u,":",p<10?"0".concat(p):p,")"]})})]})}),(0,k.jsx)(V.Z,{type:"submit",variant:"primary",disabled:r.length<6,onClick:function(e){e.preventDefault(),b({email:t,otp:parseInt(r,10)})},className:"h-[36px] w-full cursor-pointer items-center justify-center rounded-full border border-borderColor-skin-primary bg-brandColor-skin-teal text-textColor-skin-primary text-white",children:(0,k.jsx)(_.Z,{condition:y,fallback:(0,k.jsx)(k.Fragment,{children:"Verify OTP"}),children:(0,k.jsx)("div",{className:"pointer-events-none items-center justify-center text-center",children:(0,k.jsx)(Q.Z,{height:4,width:4,color:"#FFFFFF"})})})}),o&&(0,k.jsx)("div",{className:"mt-2 w-full text-left text-xs text-red-500",children:"Incorrect OTP entered. Please enter again"})]})},H=r(77566);var R=function(e){var t=e.email,r=e.otp,n=e.setIsModalOpen,s=(0,d.useState)(""),a=(s[0],s[1]),o=(0,d.useState)(""),i=o[0],l=o[1],c=(0,d.useState)(""),u=c[0],m=c[1],x=(0,v.Z)().isMobile,h=(0,H.p)().openSuccessToast,f=(0,p.useRouter)(),g=(0,F.ei)({customConfig:{onSuccess:function(){h({title:"Password updated successfully",subtitle:"Your password has been updated"}),n(!1),f.push("/login")},onError:function(e){a(null===e||void 0===e?void 0:e.message)}}}),b=g.mutate,y=g.isLoading,j=function(e){"Password"===e.target.name?l(e.target.value):m(e.target.value)};return(0,k.jsxs)("div",{className:"".concat(x?"px-4":"px-20"," h-full text-center"),children:[(0,k.jsx)("h1",{className:"".concat(x?"text-lg":"mt-[6.3rem] text-xl"," font-medium text-textColor-skin-primary"),children:"Change Password"}),(0,k.jsx)("p",{className:"mt-1 text-sm text-textColor-skin-secondary",children:"(Please ensure that your password has min. 8 characters)"}),(0,k.jsxs)("form",{onSubmit:function(e){e.preventDefault(),i.length>=8&&u.length>0&&i===u&&b({email:t,password:i,otp:r})},children:[(0,k.jsx)(A.default.Password,{placeholder:"Enter your new password",iconRender:function(e){return e?(0,k.jsx)("div",{className:"text-textColor-skin-primary",children:(0,k.jsx)(K.Z,{})}):(0,k.jsx)("div",{className:"text-textColor-skin-primary",children:(0,k.jsx)(U.Z,{})})},className:"placeholder-textColor-border-secondary auth_password__input focus:outline-none ".concat(x?"mb-4 mt-2":"my-4"," h-[36px] w-full appearance-none rounded-full border border-borderColor-skin-primary bg-backgroundColor-skin-primary px-4 py-2 leading-tight text-textColor-skin-primary shadow-none focus-within:bg-backgroundColor-skin-secondary focus:shadow-none"),id:"password",name:"Password",type:"text",onCh
1ange:j}),(0,k.jsx)(A.default.Password,{placeholder:"Confirm your new password",iconRender:function(e){return e?(0,k.jsx)("div",{className:"text-textColor-skin-primary",children:(0,k.jsx)(K.Z,{})}):(0,k.jsx)("div",{className:"text-textColor-skin-primary",children:(0,k.jsx)(U.Z,{})})},className:"placeholder-textColor-border-secondary auth_password__input focus:outline-none ".concat(u.length>0&&i!==u?"mb-1":"mb-4"," h-[36px] w-full appearance-none rounded-full border border-borderColor-skin-primary bg-backgroundColor-skin-primary px-4 py-2 leading-tight text-textColor-skin-primary shadow-none focus-within:bg-backgroundColor-skin-secondary focus:shadow-none"),id:"password",name:"ConfirmPassword",type:"text",onChange:j}),u.length>0&&i!==u&&(0,k.jsx)("div",{className:" ".concat(x?"mb-2":"mb-4 mt-1"," w-full text-left text-xs text-red-500"),children:"Password Mismatch"}),(0,k.jsx)(V.Z,{type:"submit",disabled:i.length<8||0===u.length||i!==u,variant:"primary",className:"h-[36px] w-full cursor-pointer items-center justify-center rounded-full border border-borderColor-skin-primary bg-brandColor-skin-teal text-textColor-skin-primary text-white",children:(0,k.jsx)(_.Z,{condition:y,fallback:(0,k.jsx)(k.Fragment,{children:"Submit"}),children:(0,k.jsx)("div",{className:"pointer-events-none items-center justify-center text-center",children:(0,k.jsx)(Q.Z,{height:4,width:4,color:"#FFFFFF"})})})})," "]})]})};function B(e){var t=e.setIsForgotPassword,r=e.setIsModalOpen,n=e.setCurrentAuthFeature,s=e.setMobileViewHeight,a=e.isExternal,o=e.email,i=e.isForgotPasswordEnabled,l=(0,d.useState)(""),c=l[0],u=l[1],m=(0,d.useState)(!1),x=m[0],p=m[1],h=(0,d.useState)(!1),f=h[0],g=h[1],b=(0,d.useState)(null!==o&&void 0!==o?o:""),y=b[0],j=b[1],w=(0,d.useState)(""),C=w[0],N=w[1],S=(0,v.Z)().isMobile,I=(0,F.GK)({customConfig:{onSuccess:function(){p(!0)},onError:function(e){u("Email does not exist on Tealfeed")}}}),P=I.mutate,O=I.isLoading;return(0,d.useEffect)((function(){s("h-[277px]")}),[]),(0,k.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,k.jsx)(_.Z,{condition:!a||x||f,children:(0,k.jsx)(ge,{onBack:function(){f?g(!1):x?p(!1):(n(0),s(""),t(!1))}})}),(0,k.jsx)(_.Z,{condition:!x,fallback:(0,k.jsx)(_.Z,{condition:f,fallback:(0,k.jsx)(W,{otp:C,setOtp:N,email:y,setStep3:g}),children:(0,k.jsx)(R,{setIsModalOpen:r,email:y,otp:parseInt(C,10)})}),children:(0,k.jsx)("div",{className:"".concat(S?"px-4":"px-20"," flex h-[277px] flex-1 flex-col text-center"),children:(0,k.jsxs)("div",{className:"".concat(S?"":"mt-[8.1rem]"),children:[(0,k.jsx)("h1",{className:"".concat(S?"text-lg":"text-xl"," font-medium text-textColor-skin-primary"),children:(0,k.jsx)(_.Z,{condition:i,fallback:(0,k.jsx)(k.Fragment,{children:"Set Password"}),children:S?"Forgot your Password?":"Let's Find your account"})}),(0,k.jsx)("p",{className:"mb-4 mt-1 text-textColor-skin-secondary",children:S?"You can use your email address to reset your password. You'll receive an OTP that will help you to set a new password for your Tealfeed account.":"Please enter your Email Address"}),(0,k.jsxs)("form",{onSubmit:function(e){e.preventDefault(),(0,E.Z)(y)?P({email:y}):u("Invalid email!")},children:[(0,k.jsx)(A.default,{placeholder:"Enter your email address",className:"placeholder-textColor-border-secondary h-[36px] w-full appearance-none rounded-full border border-borderColor-skin-primary bg-backgroundColor-skin-primary px-4 leading-tight text-textColor-skin-primary shadow focus:bg-backgroundColor-skin-secondary focus:outline-none",id:"name",style:{backgroundColor:"var(--background-primary)"},name:"Email",type:"text",onChange:function(e){0===e.target.value.length&&u(""),j(e.target.value)},maxLength:100,defaultValue:y,disabled:a}),c&&c.length>0&&(0,k.jsx)("div",{className:"mb-2 ml-1 mt-2 w-full text-left text-xs text-red-500",children:c}),(0,k.jsx)(V.Z,{type:"submit",variant:"primary",disabled:0===y.length,className:"".concat(c.length>0?"":"mt-4"," h-[36px] w-full cursor-pointer items-center justify-center rounded-full border border-borderColor-skin-primary bg-brandColor-skin-teal text-textColor-skin-primary text-white"),children:(0,k.jsx)(_.Z,{condition:O,fallback:(0,k.jsx)(k.Fragment,{children:"Continue"}),children:(0,k.jsx)("div",{className:"pointer-events-none items-center justify-center text-center",children:(0,k.jsx)(Q.Z,{height:4,width:4,color:"#FFFFFF"})})})})]})]})})})]})}var Y=B;B.defaultProps={isExternal:!1,setIsForgotPassword:null,setCurrentAuthFeature:null,email:null};var G=r(14876),z=r(4987),J=r(85377),X=r(86686),$=r(77555),ee=r(61317),te=r(27812),re=r(31059);var ne=function(e){var t=e.name,r=e.description,n=e.id,s=e.thumbnail,a=e.handleChange,o=(0,v.Z)().isMobile;return(0,k.jsx)("div",{className:"w-full border-t border-borderColor-skin-secondary ".concat(o?"pb-3 pt-4":" pb-6 pt-5"," "),children:(0,k.jsxs)("div",{className:"flex",children:[(0,k.jsx)(re.default,{onChange:a,value:n,className:"mr-[10px]"}),(0,k.jsx)("span",{children:(0,k.jsx)(x(),{src:s,alt:"thumbnail",width:o?50:65,height:o?50:65})}),(0,k.jsxs)("div",{className:"w-full pl-2 text-textColor-skin-primary",children:[(0,k.jsx)("h1",{className:"text-base font-medium text-textColor-skin-primary",children:t}),(0,k.jsx)("p",{className:"".concat(o?"h-9 text-xs":"h-10 text-sm"," w-full overflow-hidden font-normal"),children:r})]})]})})},se=r(34572);var ae=function(e){var t=e.setIsModalOpen,r=e.handleActionPostAuth,n=(0,v.Z)().isMobile,s=(0,d.useState)([]),a=s[0],o=s[1],i=(0,se.E)().setAuthVerified,l=(0,J.jN)().data,c=(0,J.NK)({customConfig:{onSuccess:function(){r(),t(!1),i(!0)},onError:function(){t(!1),i(!0)}}}).mutate,u=function(e){e.preventDefault(),e.target.checked?o((function(t){return[].concat((0,te.Z)(t),[e.target.value])})):o((function(t){return t.filter((function(t){return t!==e.target.value}))}))};return(0,k.jsxs)("div",{className:"".concat(n?"p-[21px]":"p-9"," flex h-[32rem] flex-col items-center"),children:[(0,k.jsx)("h1",{className:"".concat(n?"mt-[3px]":"mt-[16px]"," text-xl font-medium text-textColor-skin-primary"),children:"Pending Invites"}),(0,k.jsx)("p",{className:"mt-1 text-sm text-textColor-skin-secondary",children:"You can subscribe to your pending newsletter invites"}),(0,k.jsx)("div",{className:"mt-4 w-full overflow-scroll",children:l.map((function(e){return(0,k.jsx)(ne,{name:null===e||void 0===e?void 0:e.publication.name,description:null===e||void 0===e?void 0:e.publication.description,thumbnail:null===e||void 0===e?void 0:e.publication.thumbnail,id:null===e||void 0===e?void 0:e._id,handleChange:u})}))}),(0,k.jsxs)("div",{className:"mt-[15px] flex w-full items-center justify-end",children:[(0,k.jsx)("p",{onClick:function(){r(),i(!0),t(!1)},className:"mr-6 cursor-pointer text-textColor-skin-secondary",children:"Skip"}),(0,k.jsx)(V.Z,{onClick:function(){c({subscriptionIds:a})},variant:"primary",children:"Done"})]})]})},oe=r(65483),ie=r(41003),le=r(3129),ce=r(78208);function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?ue(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function me(e){var t=e.isForgotPassword,r=e.setIsForgotPassword,n=e.setIsLoginWithPasswordScreen,s=e.setIsModalOpen,a=e.setCurrentAuthFeature,c=e.email,m=e.authFeature,x=e.setMobileViewHeight,g=e.setPendingInvites,b=e.pendingInvites,y=(0,d.useState)(""),j=y[0],w=(y[1],(0,d.useState)("")),C=w[0],N=w[1],S=(0,d.useState)(""),Z=S[0],D=S[1],T=(0,d.useState)(""),L=T[0],q=T[1],W=(0,se.E)(),R=W.setLoggedInUser,B=W.setAuthVerified,te=(0,d.useState)(!1),re=te[0],ne=te[1],ue=(0,v.Z)().isMobile,me=(0,d.useState)({Email:c,Password:""}),xe=me[0],pe=me[1],he=(0,p.useRouter)(),fe=(0,ee.Z)("authAction",null),be=(0,l.Z)(fe,1)[0],ye=(0,ee.Z)("authPayload",null),ve=(0,l.Z)(ye,1)[0],je=(0,H.p)(),we=je.openSuccessToast,ke=je.openErrorToast,Ce=(0,h.NL)(),Ne=(0,ce.Z)().setHasFiredConfetti,Se=(0,J.AA)({customConfig:{onSuccess:function(e){var t=e.url;t&&(window.location.href=t)},onError:function(e){var t;ke({title:"Subscription failed",subtitle:(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data.errorMessage)||"Something went wrong"})}}}).mutate,Ie=(0,J._8)({customConfig:{onSuccess:function(){Ne((function(e){return e+1})),we({title:"Subscribed",subtitle:"You have successfully subscribed to the newsletter"})},onError:function(e){var t;ke({title:"Subscription failed",subtitle:(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data.errorMessage)||"Something went wrong"})}}}).mutate,Pe=(0,z.ti)({userId:ve,customConfig:{onMutate:function(){var e=(0,i.Z)(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ce.cancelQueries(z.SW.getUserMetaDataQueryKey({userId:ve}));case 2:return t=Ce.getQueryData(z.SW.getUserMetaDataQueryKey({userId:ve})),Ce.setQueryData(z.SW.getUserMetaDataQueryKey({userId:ve}),(function(e){return de(de({},e),{},{isFollowed:!0})})),e.abrupt("return",{previousMetaData:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onError:function(e,t,r){Ce.setQueryData(z.SW.getUserMetaDataQueryKey({userId:ve}),r.previousMetaData)},onSuccess:function(){},onSettled:function(){Ce.invalidateQueries(z.SW.getUserMetaDataQueryKey({userId:ve}))}}}),Oe=Pe.mutate,Me=(0,G.Ty)({customConfig:{}}).mutate,Ze=(0,X.Kb)({topicId:ve,customConfig:{onSuccess:function(){Ce.invalidateQueries(X.sM.getTopicMetaDataQueryKey({topicId:ve})),Ce.invalidateQueries($.sn.getDiscoverTopicsQueryKey)}}}).mutate,Fe=(0,le.Zi)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;ke({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate,Ee=(0,le.jl)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;ke({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate;function _e(){switch(be){case 0:break;case 1:Oe(ve);break;case 3:Me(ve);break;case 4:Ze(ve);break;case 8:Fe(ve);break;case 9:Ee(ve);break;case 10:he.push(ve.path);break;case 11:Ie(ve);break;case 12:Se(ve)}}(0,J.jN)({customConfig:{enabled:re,onSuccess:function(e){e.length>0?g(!0):(_e(),B(!0),sessionStorage.removeItem("authAction"),sessionStorage.removeItem("authPayload"))}}});var Ae=(0,F.cm)({customConfig:{onSuccess:function(e){var t={avatar:e.avatar,email:e.email,fullName:e.fullName,headline:e.headline,role:e.role,id:e.sub,userName:e.userName,connectStatus:null===e||void 0===e?void 0:e.connectStatus,isTeam:null===e||void 0===e?void 0:e.isTeam};sessionStorage.removeItem("accessingMemberId"),(0,ie.kT)("accessingMemberId"),(0,oe.qe)("sign-in-success",{userAgent:window.navigator.userAgent,login_option:"email",email:e.email,userId:e.sub}
1),(0,oe.pH)(de({login_type:"email",source:"modal"},t)),(0,ie.yL)("isAuthenticated","true",2592e6),m===f.E6.newsletter?ne(!0):(R(t),B(!0),_e(),sessionStorage.removeItem("authAction"),sessionStorage.removeItem("authPayload"))}}}),De=Ae.mutate,Te=Ae.error,Qe=Ae.isLoading,Le=function(e){pe(de(de({},xe),{},(0,o.Z)({},e.target.name,e.target.value)))},qe=function(){var e=(0,i.Z)(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),(0,E.Z)(xe.Email)?xe.Password.length>=8?De({email:xe.Email,password:xe.Password,refId:he.query.refId,utm_adset:he.query.utm_adset,utm_campaign:he.query.utm_campaign,utm_content:he.query.utm_content,utm_medium:he.query.utm_medium,utm_source:he.query.utm_source}):q("Please ensure that your password has min. 8 characters"):D("Invalid email! Please check the email address and try again ");case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,d.useEffect)((function(){Te&&N(Te.response.data.errorMessage)}),[Te]),(0,k.jsx)(_.Z,{condition:!b,fallback:(0,k.jsx)(ae,{setIsModalOpen:s,handleActionPostAuth:_e}),children:(0,k.jsx)(_.Z,{condition:!t,fallback:(0,k.jsx)(Y,{setIsModalOpen:s,setIsForgotPassword:r,setCurrentAuthFeature:a,setMobileViewHeight:x}),children:(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ge,{onBack:function(){return n(!1)}}),(0,k.jsxs)("div",{className:"".concat(ue?"px-4":"mt-2 px-20"," h-full text-center"),children:[(0,k.jsx)("h1",{className:"".concat(ue?"text-lg":"text-xl"," font-medium text-textColor-skin-primary"),children:ue?"Sign In To Continue":"Login to Continue"}),(0,k.jsx)("p",{className:"mt-1 text-sm text-textColor-skin-secondary",children:ue?"Enter your details and Sign in to Tealfeed":"Enter your details to continue"}),(0,k.jsxs)("form",{onSubmit:qe,children:[(0,k.jsx)(A.default,{placeholder:"Enter your email",className:"placeholder-textColor-border-secondary my-4 h-[36px] w-full rounded-full bg-backgroundColor-skin-primary px-4 py-3 text-textColor-skin-primary shadow-none focus:shadow-none",id:"name",name:"Email",type:"text",onChange:Le,maxLength:100,defaultValue:c}),(0,k.jsx)(A.default.Password,{placeholder:"Enter your password",iconRender:function(e){return e?(0,k.jsx)("div",{className:"text-textColor-skin-primary",children:(0,k.jsx)(K.Z,{})}):(0,k.jsx)("div",{className:"text-textColor-skin-primary",children:(0,k.jsx)(U.Z,{})})},className:"placeholder-textColor-border-secondary auth_password__input mb-2 h-[36px] w-full rounded-full bg-backgroundColor-skin-primary px-4 leading-tight text-textColor-skin-primary shadow-none focus:shadow-none focus:outline-none",id:"password",name:"Password",type:"text",onChange:Le}),(0,k.jsxs)("div",{className:"grid",children:[C&&C.length>0&&(0,k.jsx)("span",{className:"text-left text-xs text-red-500",children:C}),Z.length>0&&(0,k.jsx)("span",{className:"text-left text-xs text-red-500",children:Z}),L.length>0&&(0,k.jsx)("span",{className:"text-left text-xs text-red-500",children:L}),(0,k.jsx)("p",{className:"mb-4 flex w-full justify-end text-textColor-skin-brand underline",children:(0,k.jsx)("p",{onClick:function(){a(3),r(!0)},className:"w-max cursor-pointer text-sm decoration-[#008080]",children:"Forgot Password?"})})]}),(0,k.jsx)(V.Z,{variant:"primary",type:"submit",disabled:0===xe.Email.length||xe.Password.length<8,className:"h-[36px] w-full cursor-pointer items-center justify-center rounded-full bg-brandColor-skin-teal text-textColor-skin-primary text-white",children:(0,k.jsx)(_.Z,{condition:Qe,fallback:(0,k.jsx)(_.Z,{condition:m===f.E6.default,fallback:(0,k.jsx)(_.Z,{condition:m===f.E6.connect,fallback:(0,k.jsx)(k.Fragment,{children:"Login and Subscribe"}),children:(0,k.jsx)(k.Fragment,{children:"Login and Continue"})}),children:(0,k.jsx)(k.Fragment,{children:"Login"})}),children:(0,k.jsx)("div",{className:"pointer-events-none items-center justify-center text-center",children:(0,k.jsx)(Q.Z,{height:4,width:4,color:"#FFFFFF"})})})})]}),(0,k.jsx)(I.Z,{style:{color:"var(--border-primary)",border:50},children:(0,k.jsx)("span",{className:"font-normal text-textColor-skin-secondary",children:"or"})}),(0,k.jsx)(P.SV,{fallback:(0,k.jsx)(k.Fragment,{}),children:(0,k.jsx)(O.Z,{authFeature:m})}),(0,k.jsx)(M.Z,{onClick:function(){},style:{marginTop:"16px"}}),j.length>0&&(0,k.jsx)("div",{className:"mt-2 w-full text-left text-xs text-red-500",children:j})]})]})})})}var xe=me;function pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?pe(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function fe(e){var t=e.email,r=e.setOtpScreen,n=e.setIsModalOpen,s=e.setCurrentAuthFeature,a=e.authFeature,o=e.backEnabled,c=e.setMobileViewHeight,m=e.pendingInvites,x=e.setPendingInvites,g=(0,v.Z)().isMobile,b=(0,d.useState)(""),y=b[0],j=b[1],w=(0,d.useState)(!1),C=w[0],N=w[1],S=(0,d.useState)(!1),P=S[0],O=S[1],M=(0,d.useState)(!1),Z=M[0],E=M[1],A=(0,d.useState)(3),T=A[0],L=A[1],q=(0,d.useState)(0),K=q[0],U=q[1],W=(0,ee.Z)("authAction",null),R=(0,l.Z)(W,1)[0],B=(0,ee.Z)("authPayload",null),Y=(0,l.Z)(B,1)[0],te=(0,H.p)(),re=te.openSuccessToast,ne=te.openErrorToast,ue=(0,h.NL)(),de=(0,d.useState)(!1)[0],me=(0,p.useRouter)(),pe=(0,ce.Z)().setHasFiredConfetti,fe=(0,J.AA)({customConfig:{onSuccess:function(e){var t=e.url;t&&(window.location.href=t)},onError:function(e){var t;ne({title:"Subscription failed",subtitle:(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data.errorMessage)||"Something went wrong"})}}}).mutate,be=(0,J._8)({customConfig:{onSuccess:function(){pe((function(e){return e+1})),re({title:"Subscribed",subtitle:"You have successfully subscribed to the newsletter"})},onError:function(e){var t;ne({title:"Subscription failed",subtitle:(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data.errorMessage)||"Something went wrong"})}}}).mutate,ye=(0,z.ti)({userId:Y,customConfig:{onMutate:function(){var e=(0,i.Z)(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ue.cancelQueries(z.SW.getUserMetaDataQueryKey({userId:Y}));case 2:return t=ue.getQueryData(z.SW.getUserMetaDataQueryKey({userId:Y})),ue.setQueryData(z.SW.getUserMetaDataQueryKey({userId:Y}),(function(e){return he(he({},e),{},{isFollowed:!0})})),e.abrupt("return",{previousMetaData:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onError:function(e,t){ue.setQueryData(z.SW.getUserMetaDataQueryKey({userId:Y}),t.previousMetaData)},onSuccess:function(){},onSettled:function(){ue.invalidateQueries(z.SW.getUserMetaDataQueryKey({userId:Y}))}}}),ve=ye.mutate,je=(0,G.Ty)().mutate,we=(0,X.Kb)({topicId:Y,customConfig:{onSuccess:function(){ue.invalidateQueries(X.sM.getTopicMetaDataQueryKey({topicId:Y})),ue.invalidateQueries($.sn.getDiscoverTopicsQueryKey)}}}).mutate,ke=(0,le.Zi)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;ne({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate,Ce=(0,le.jl)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;ne({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate;function Ne(){switch(R){case 0:break;case 1:ve(Y);break;case 3:je(Y);break;case 4:we(Y);break;case 8:ke(Y);break;case 9:Ce(Y);break;case 10:me.push(Y.path);break;case 11:be(Y);break;case 12:fe(Y)}}(0,J.jN)({customConfig:{enabled:de,onSuccess:function(e){e.length>0?x(!0):(Ne(),Pe(!0),sessionStorage.removeItem("authAction"),sessionStorage.removeItem("authPayload"))}}});var Se=(0,se.E)(),Ie=Se.setLoggedInUser,Pe=Se.setAuthVerified,Oe=(0,F.S6)({customConfig:{onSuccess:function(e){var t={avatar:e.avatar,email:e.email,fullName:e.fullName,headline:e.headline,role:e.role,id:e.sub,userName:e.userName,connectStatus:null===e||void 0===e?void 0:e.connectStatus,isTeam:null===e||void 0===e?void 0:e.isTeam};sessionStorage.removeItem("accessingMemberId"),(0,ie.kT)("accessingMemberId"),(0,oe.qe)("sign-in-success",{userAgent:window.navigator.userAgent,login_option:"otp",userId:e.sub}),(0,oe.pH)(he({login_type:"otp"},t)),(0,ie.yL)("isAuthenticated","true",2592e6),Ie(t),Pe(!0),Ne(),sessionStorage.removeItem("authAction"),sessionStorage.removeItem("authPayload"),n(!1)},onError:function(e){var t;O(!0),(0,oe.qe)("sign-in-failure",{userAgent:window.navigator.userAgent,login_option:"otp",failure_reason:null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data.errorMessage})}}}),Me=Oe.mutate,Ze=Oe.isLoading,Fe=(0,F.qc)().mutate;return(0,d.useEffect)((function(){var e=setInterval((function(){K>0&&U(K-1),0===K&&(0===T?clearInterval(e):(U(59),L(T-1)))}),1e3);return function(){clearInterval(e)}}),[T,K]),(0,k.jsx)(_.Z,{condition:m,fallback:(0,k.jsx)("div",{className:"flex h-full flex-col",children:(0,k.jsx)(_.Z,{condition:!C,fallback:(0,k.jsx)(xe,{isForgotPassword:Z,setIsForgotPassword:E,setIsLoginWithPasswordScreen:N,setIsModalOpen:n,setCurrentAuthFeature:s,email:t,authFeature:a,setMobileViewHeight:c,setPendingInvites:x,pendingInvites:m}),children:(0,k.jsxs)("div",{className:"flex h-full flex-col",children:[(0,k.jsx)(_.Z,{condition:o,children:(0,k.jsx)(ge,{onBack:function(){C?N(!1):r(!1)}})}),(0,k.jsxs)("div",{className:"".concat(g?"px-4":"mt-2 px-20"," flex-1 text-center"),children:[(0,k.jsx)("h1",{className:"".concat(g?"text-lg":"text-xl"," font-medium text-textColor-skin-primary ").concat(!o&&"mt-[54px]"," "),children:"OTP Verification"}),(0,k.jsxs)("p",{className:"mb-4 mt-1 text-sm text-textColor-skin-secondary",children:["A 6 digit verification code has been sent to your email \xa0",(0,k.jsx)("span",{className:"text-textColor-skin-primary",children:t})]}),(0,k.jsx)(D.Z,{value:y,onChange:function(e){P&&O(!1),j(e)},isInputNum:!0,numInputs:6,inputStyle:{height:40,width:40,borderRadius:10,background:"var(--hover-background)",color:"var(--text-primary)",border:P?"1px solid var(--text-error)":"1px solid var(--border-primary)"},containerStyle:{display:"flex",gap:"10px",alignItems:"center",width:"100%",justifyContent:"space-between"},shouldAutoFocus:!0}),(0,k.jsx)("div",{className:"".concat(g?"mb-5 mt-2":"my-4"," text-left text-textColor-skin-light"),children:(0,k.jsxs)("p",{className:"w-max ".concat(0===K&&
10===T?"cursor-pointer text-textColor-skin-brand":"cursor-not-allowed text-textColor-skin-secondary "),onClick:function(){0===T&&0===K&&(Fe({email:t}),L(3))},children:["Resend Code",(0,k.jsx)(_.Z,{condition:0!==T||0!==K,children:(0,k.jsxs)(k.Fragment,{children:["\xa0(",T<10?"0".concat(T):T,":",K<10?"0".concat(K):K,")"]})})]})}),(0,k.jsx)(V.Z,{type:"submit",variant:"primary",disabled:y.length<6,onClick:function(e){e.preventDefault(),(0,oe.qe)("sign-in-modal-otp-entered",{source:me.asPath,email:t}),Me({email:t,otp:parseInt(y,10),refId:me.query.refId,utm_adset:me.query.utm_adset,utm_campaign:me.query.utm_campaign,utm_content:me.query.utm_content,utm_medium:me.query.utm_medium,utm_source:me.query.utm_source})},className:"h-[36px] w-full cursor-pointer items-center justify-center rounded-full border border-borderColor-skin-primary bg-brandColor-skin-teal text-textColor-skin-primary text-white",children:(0,k.jsx)(_.Z,{condition:Ze,fallback:(0,k.jsx)(_.Z,{condition:a===f.E6.default,fallback:(0,k.jsx)(_.Z,{condition:a===f.E6.connect,fallback:(0,k.jsx)(k.Fragment,{children:"Verify and Subscribe"}),children:(0,k.jsx)(k.Fragment,{children:"Verify and Continue"})}),children:(0,k.jsx)(k.Fragment,{children:"Verify and Login"})}),children:(0,k.jsx)("div",{className:"pointer-events-none items-center justify-center text-center",children:(0,k.jsx)(Q.Z,{height:4,width:4,color:"#FFFFFF"})})})}),P&&(0,k.jsx)("div",{className:"mt-2 w-full text-left text-xs text-red-500",children:"Incorrect OTP entered. Please enter again"}),(0,k.jsx)(I.Z,{style:{color:"var(--border-primary)",border:50},children:(0,k.jsx)("span",{className:"text-sm font-normal text-textColor-skin-secondary",children:"or"})}),(0,k.jsx)("div",{className:"flex justify-center",children:(0,k.jsx)("p",{className:"w-max cursor-pointer text-brandColor-skin-teal underline decoration-[#008080]",onClick:function(){return N(!0)},children:"Login with Password"})})]})]})})}),children:(0,k.jsx)(ae,{setIsModalOpen:n,handleActionPostAuth:Ne})})}me.defaultProps={setPendingInvites:null,pendingInvites:!1};var ge=function(e){var t=e.onBack,r=(0,v.Z)().isMobile;return(0,k.jsx)("div",{className:"ml-4 mt-4 w-full",children:(0,k.jsxs)("div",{onClick:t,className:"flex w-min cursor-pointer items-center text-textColor-skin-primary",children:[(0,k.jsx)(q,{}),!r&&(0,k.jsx)("p",{className:"ml-2",children:"Back"})]})})},be=fe;fe.defaultProps={authFeature:null,pendingInvites:!1,setPendingInvites:function(){}};var ye=r(41705);function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var we=function(e){var t=e.email,r=e.setOtpScreen,n=e.setIsModalOpen,s=e.authFeature,a=e.backEnabled,o=(0,v.Z)().isMobile,c=(0,d.useState)(""),m=c[0],x=c[1],g=(0,d.useState)(""),b=g[0],y=g[1],j=(0,d.useState)(!1),w=j[0],C=j[1],N=(0,d.useState)(3),S=N[0],I=N[1],P=(0,d.useState)(0),O=P[0],M=P[1],E=(0,se.E)(),L=E.setAuthVerified,q=E.setLoggedInUser,K=(0,H.p)(),U=K.openSuccessToast,W=K.openErrorToast,R=(0,h.NL)(),B=(0,p.useRouter)(),Y=(0,ee.Z)("authPayload",null),te=(0,l.Z)(Y,1)[0],re=(0,ee.Z)("authAction",null),ne=(0,l.Z)(re,1)[0],ae=(0,J.HW)({subscriptionData:te,customConfig:{onSuccess:function(){R.invalidateQueries(["newsletter-metadata"]),n(!1),R.invalidateQueries(J.fc.getNewsletterMetaQuery({newsletterId:te.publicationId})),R.invalidateQueries(),o?T.ZP.success("Subscription successful!",{icon:(0,k.jsx)(ye.Z,{})}):U({title:"Subscription successful!",subtitle:"You can view all your subscriptions through your profile."})}}}).mutate,ce=(0,z.ti)({userId:te,customConfig:{onMutate:function(){var e=(0,i.Z)(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R.cancelQueries(z.SW.getUserMetaDataQueryKey({userId:te}));case 2:return t=R.getQueryData(z.SW.getUserMetaDataQueryKey({userId:te})),R.setQueryData(z.SW.getUserMetaDataQueryKey({userId:te}),(function(e){return je(je({},e),{},{isFollowed:!0})})),e.abrupt("return",{previousMetaData:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onError:function(e,t,r){R.setQueryData(z.SW.getUserMetaDataQueryKey({userId:te}),r.previousMetaData)},onSuccess:function(){},onSettled:function(){R.invalidateQueries(z.SW.getUserMetaDataQueryKey({userId:te}))}}}),ue=ce.mutate,de=(0,G.Ty)({customConfig:{}}).mutate,me=(0,X.Kb)({topicId:te,customConfig:{onSuccess:function(){R.invalidateQueries(X.sM.getTopicMetaDataQueryKey({topicId:te})),R.invalidateQueries($.sn.getDiscoverTopicsQueryKey)}}}).mutate,xe=(0,le.Zi)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;
1W({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate,pe=(0,le.jl)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;W({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate,he=(0,F.Js)({customConfig:{onSettled:function(){!function(){switch(ne){case 0:break;case 1:ue(te);break;case 2:ae();break;case 3:de(te);break;case 4:me(te);break;case 8:xe(te);break;case 9:pe(te);break;case 10:B.push(te.path)}}(),sessionStorage.removeItem("authAction"),sessionStorage.removeItem("authPayload")},onSuccess:function(e){var t={avatar:e.avatar,email:e.email,fullName:e.fullName,headline:e.headline,role:e.role,id:e.sub,userName:e.userName};q(t),L(!0),(0,oe.qe)("sign-up-success",{userAgent:window.navigator.userAgent,login_option:"email",email:e.email}),(0,oe.EL)({ID:e.sub,email:e.email,fullName:e.fullName,userName:e.userName,firstName:e.fullName.split(" ")[0],signup_type:"email",email_verified:!0,avatar:e.avatar,role:e.role,headline:e.headline,connectStatus:null===e||void 0===e?void 0:e.connectStatus,isTeam:null===e||void 0===e?void 0:e.isTeam}),(0,Z.UC)(e.sub,e.fullName,e.email),(0,ie.yL)("isAuthenticated","true",2592e6)},onError:function(e){C(!0),(0,oe.qe)("sign-up-failure",{userAgent:window.navigator.userAgent,login_option:"otp",failure_reason:e.message})}}}),fe=he.mutate,be=he.isLoading,ve=(0,F.qc)().mutate;return(0,d.useEffect)((function(){var e=setInterval((function(){O>0&&M(O-1),0===O&&(0===S?clearInterval(e):(M(59),I(S-1)))}),1e3);return function(){clearInterval(e)}}),[S,O]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(_.Z,{condition:a,children:(0,k.jsx)(ge,{onBack:function(){r(!1)}})}),(0,k.jsxs)("div",{className:"h-full ".concat(o?"px-4":"mt-[6px] px-20"," text-center"),children:[(0,k.jsx)("h1",{className:"".concat(o?"text-lg":"text-xl"," font-medium text-textColor-skin-primary ").concat(!a&&"mt-[54px]"),children:"OTP Verification"}),(0,k.jsx)("p",{className:"mt-1 text-sm text-textColor-skin-secondary",children:"Enter your name and Otp to continue"}),(0,k.jsx)(A.default,{placeholder:"Enter your Name",className:"placeholder-textColor-border-secondary my-4 h-[36px] w-full rounded-full border-borderColor-skin-primary bg-backgroundColor-skin-primary px-4 py-3 text-textColor-skin-primary outline-none focus:bg-backgroundColor-skin-secondary focus:shadow-none focus:outline-none",id:"name",name:"Name",type:"text",onChange:function(e){y(e.target.value)},maxLength:100,autoFocus:!0}),(0,k.jsxs)("p",{className:"font-sm mb-3 text-left text-textColor-skin-secondary",children:["A 6 digit verification code has been sent to your email"," ",(0,k.jsx)("span",{className:"text-textColor-skin-primary",children:t})]}),(0,k.jsx)(D.Z,{value:m,onChange:function(e){w&&C(!1),x(e)},isInputNum:!0,numInputs:6,inputStyle:{height:40,width:40,borderRadius:10,background:"var(--hover-background)",color:"var(--text-primary)",border:w?"1px solid var(--text-error)":"1px solid var(--border-primary)"},containerStyle:{display:"flex",gap:"10px",alignItems:"center",width:"100%",justifyContent:"space-between"}}),(0,k.jsx)("div",{className:"font-sm ".concat(o?"mb-5 mt-2":"my-4"," text-left text-textColor-skin-light"),children:(0,k.jsxs)("p",{className:"w-max ".concat(0===O&&0===S?"cursor-pointer text-textColor-skin-brand":"cursor-not-allowed text-textColor-skin-secondary"),onClick:function(){0===S&&0===O&&(ve({email:t}),I(3))},children:["Resend Code",(0,k.jsx)(_.Z,{condition:0!==S||0!==O,children:(0,k.jsxs)(k.Fragment,{children:["\xa0(",S<10?"0".concat(S):S,":",O<10?"0".concat(O):O,")"]})})]})}),(0,k.jsx)(V.Z,{type:"submit",variant:"primary",disabled:m.length<6||0===b.length,onClick:function(e){e.preventDefault(),(0,oe.qe)("sign-up-modal-otp-entered",{source:B.asPath,email:t,fullName:b,otp:parseInt(m,10)}),fe({email:t,fullName:b,otp:parseInt(m,10),refId:B.query.refId,utm_adset:B.query.utm_adset,utm_campaign:B.query.utm_campaign,utm_c
1ontent:B.query.utm_content,utm_medium:B.query.utm_medium,utm_source:B.query.utm_source})},className:"flex ".concat(o?"h-[34px]":"h-[36px]"," mt-4 w-full cursor-pointer items-center justify-center rounded-full bg-brandColor-skin-teal text-textColor-skin-primary text-white"),children:(0,k.jsx)(_.Z,{condition:be,fallback:(0,k.jsx)(_.Z,{condition:s===f.E6.default,fallback:(0,k.jsx)(_.Z,{condition:s===f.E6.connect,fallback:(0,k.jsx)(k.Fragment,{children:"Register and Subscribe"}),children:(0,k.jsx)(k.Fragment,{children:"Register and Continue"})}),children:(0,k.jsx)(k.Fragment,{children:"Verify and SignUp"})}),children:(0,k.jsx)("div",{className:"pointer-events-none items-center justify-center text-center",children:(0,k.jsx)(Q.Z,{height:4,width:4,color:"#FFFFFF"})})})}),w&&(0,k.jsx)("div",{className:"mt-2 w-full text-left text-xs text-red-500",children:"Incorrect OTP entered. Please enter again"})]})]})},ke=r(52104),Ce=r(61247);var Ne=function(e){var t=e.setIsModalOpen,r=e.setCurrentAuthFeature,n=e.authFeature,s=e.setMobileViewHeight,a=e.setAuthType,o=(0,v.Z)().isMobile,i=(0,d.useState)("")[0],l=(0,d.useState)(""),c=l[0],u=l[1],m=(0,d.useState)(!1),x=m[0],h=m[1],g=(0,d.useState)(!1),y=g[0],j=g[1],w=(0,d.useState)(""),C=w[0],N=w[1],S=(0,p.useRouter)();(0,d.useEffect)((function(){var e,t=Array.isArray(S.query.email)?S.query.email[0]:null!==(e=S.query.email)&&void 0!==e?e:"";t&&N(t)}),[S.query.email]);var A=(0,F.qc)({customConfig:{onSuccess:function(e){switch(e.type){case"login":a(f.Gr.login),h(!0);break;case"register":a(f.Gr.signup),j(!0)}}}}).mutate,D=["0","1","4","7"];return(0,d.useEffect)((function(){D.includes(sessionStorage.getItem("authAction"))||(sessionStorage.setItem("authAction","0"),sessionStorage.setItem("authPayload",null))}),[]),(0,k.jsx)(_.Z,{condition:!y,fallback:(0,k.jsx)(we,{authFeature:n,email:C,setOtpScreen:j,setIsModalOpen:t,backEnabled:!0}),children:(0,k.jsx)(_.Z,{condition:!x,fallback:(0,k.jsx)(be,{authFeature:n,setOtpScreen:h,email:C,setIsModalOpen:t,setCurrentAuthFeature:r,backEnabled:!0,setMobileViewHeight:s}),children:(0,k.jsx)("div",{className:"flex h-full flex-col justify-center ".concat(o?"px-4":"px-20"," text-center"),children:(0,k.jsxs)("div",{children:[(0,k.jsx)("h1",{className:"".concat(o?"mb-1 text-lg":"mb-2 text-xl"," font-medium text-textColor-skin-primary"),children:"Login / Sign Up"}),(0,k.jsx)("p",{className:"".concat("mb-4"," text-sm text-textColor-skin-secondary"),children:"Join Tealfeed and take the first step towards streamlining and growing your practice."}),(0,k.jsx)(P.SV,{fallback:(0,k.jsx)(k.Fragment,{}),children:(0,k.jsx)(O.Z,{setIsModalOpen:t,authFeature:f.E6.default})}),(0,k.jsx)(M.Z,{style:{marginTop:"16px"},onClick:function(){}}),i.length>0&&(0,k.jsx)("span",{className:"text-red-500 text-left text-xs",children:i}),(0,k.jsx)(I.Z,{style:{color:"var(--border-primary)",border:50},children:(0,k.jsx)("span",{className:"text-sm font-normal text-textColor-skin-secondary",children:"or"})}),(0,k.jsx)(ke.Z,{variant:"login",handleSubmit:function(e){e.preventDefault(),(0,E.Z)(C)?((0,oe.qe)("sign-in-modal-email-entered",{source:S.asPath,email:C}),(0,Ce.P)("sign-in-modal-email-entered",{source:S.asPath,email:C}),A({email:C})):u("Invalid Email")},text:"Continue",setEmail:N,email:C}),c.length>0&&(0,k.jsx)("div",{className:"text-red-500 mb-2 ml-1 mt-2 w-full text-left text-xs",children:c}),(0,k.jsxs)("div",{children:[(0,k.jsxs)("p",{className:"".concat(c.length>0?"":"mt-6"," text-xs text-textColor-skin-secondary"),children:["By continuing, you agree to Tealfeed"," ",(0,k.jsx)(b(),{href:"https://home.tealfeed.com/polices/terms-of-use",target:"_blank",children:(0,k.jsx)("a",{target:"_blank",onClick:function(){return(0,Z.m4)("Terms")},className:"text-brandColor-skin-teal",children:"Terms"})})," ","and"," ",(0,k.jsx)(b(),{href:"https://home.tealfeed.com/polices/privacy-policy",children:(0,k.jsx)("a",{target:"_blank",onClick:function(){return(0,Z.m4)("Privacy Policy")},className:"text-brandColor-skin-teal",children:"Privacy Policy"})})]}),(0,k.jsxs)("p",{className:"pt-2 text-xs text-textColor-skin-secondary",children:["Protected by reCAPTCHA and the Google"," ",(0,k.jsx)(b(),{href:"https://policies.google.com/privacy",children:(0,k.jsx)("a",{target:"_blank",className:"underline",children:"Privacy Policy"})})," ","and"," ",(0,k.jsx)(b(),{href:"https://policies.google.com/terms",target:"_blank",children:(0,k.jsx)("a",{target:"_blank",className:"underline",children:"Terms of Service"})})," ","apply."]}),(0,k.jsx)("p",{className:"pt-4 text-xs text-textColor-skin-secondary",children:"Tealfeed Pvt Ltd \xa92023"})]})]})})})})};var Se=function(e){var t=e.setCurrentAuthFeature,r=e.setIsModalOpen,n=e.authFeature,s=e.setMobileViewHeight,a=e.email,o=(0,v.Z)().isMobile,i=(0,d.useState)(""),l=i[0],c=i[1],u=(0,d.useState)(!1),m=u[0],x=u[1],p=(0,d.useState)(!1),h=p[0],f=p[1],g=(0,d.useState)(null!==a&&void 0!==a?a:""),y=g[0],j=g[1],C=(0,F.qc)({customConfig:{onSuccess:function(e){switch(e.type){case"login":x(!0);break;case"register":f(!0)}}}}).mutate;return(0,k.jsx)(_.Z,{condition:!h,fallback:(0,k.jsx)(we,{authFeature:n,email:y,setOtpScreen:f,setIsModalOpen:r,backEnabled:!0}),children:(0,k.jsx)(_.Z,{condition:!m,fallback:(0,k.jsx)(be,{authFeature:n,setOtpScreen:x,email:y,setCurrentAuthFeature:t,setIsModalOpen:r,backEnabled:!0,setMobileViewHeight:s}),children:(0,k.jsx)("div",{className:"".concat(o?"px-4":"flex px-20"," h-full flex-col text-center"),children:(0,k.jsxs)("div",{children:[(0,k.jsx)("h1",{className:"".concat(o?"mt-6":"mt-[6.68rem]"," text-xl font-medium text-textColor-skin-primary"),children:o?"Connect with Me":"Tell us your email"}),(0,k.jsxs)("p",{className:"".concat(o?"mt-1":"mt-2"," mb-4 text-sm text-textColor-skin-secondary"),children:[(0,k.jsx)("p",{children:"We will use this email to send you reminders and other important notifications regarding your session"}),(0,k.jsx)(_.Z,{condition:o,children:(0,k.jsx)(k.Fragment,{children:(0,k.jsxs)("div",{className:"mt-2 flex-col items-center",children:[(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-4",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:"text-left text-textColor-skin-secondary",children:"Find and Connect with more industry experts"})]}),(0,k.jsxs)("div",{className:"mt-2 flex items-center",children:[(0,k.jsx)("p",{className:"mr-4",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:" text-left text-textColor-skin-secondary",children:"Schedule 1:1 Sessions and Manage Bookings."})]})]})})})]}),(0,k.jsx)(ke.Z,{variant:"login",handleSubmit:function(e){e.preventDefault(),(0,E.Z)(y)?C({email:y}):c("Invalid Email")},text:"Continue",setEmail:j,email:y}),l.length>0&&(0,k.jsx)("div",{className:"mt-2 w-full text-left text-xs text-red-500",children:l}),(0,k.jsxs)("div",{children:[(0,k.jsxs)("p",{className:"mt-6 text-xs text-textColor-skin-secondary",children:["By continuing, you agree to Tealfeed"," ",(0,k.jsx)(b(),{href:"/terms",target:"_blank",children:(0,k.jsx)("a",{target:"_blank",onClick:function(){return(0,Z.m4)("Terms")},className:"text-brandColor-skin-teal",children:"Terms"})})," ","and"," ",(0,k.jsx)(b(),{href:"/privacy",children:(0,k.jsx)("a",{target:"_blank",onClick:function(){return(0,Z.m4)("Privacy Policy")},className:"text-brandColor-skin-teal",children:"Privacy Policy"})})]}),(0,k.jsxs)("p",{className:"pt-2 text-xs text-textColor-skin-secondary",children:["Protected by reCAPTCHA and the Google"," ",(0,k.jsx)(b(),{href:"https://policies.google.com/privacy",children:(0,k.jsx)("a",{target:"_blank",className:"underline",children:"Privacy Policy"})})," ","and"," ",(0,k.jsx)(b(),{href:"https://policies.google.com/terms",target:"_blank",children:(0,k.jsx)("a",{target:"_blank",className:"underline",children:"Terms of Service"})})," ","apply."]}),(0,k.jsx)("p",{className:"pt-4 text-xs text-textColor-skin-secondary",children:"Tealfeed Pvt Ltd \xa92023"})]})]})})})})};function Ie(e){var t=e.setIsModalOpen,r=e.setCurrentAuthFeature,n=e.authFeature,s=e.setPendingInvites,a=e.pendingInvites,o=e.otp,i=e.isLogin,l=e.email,c=e.setMobileViewHeight,u=(0,v.Z)().isMobile,m=(0,d.useState)("")[0],x=(0,d.useState)(""),p=x[0],h=x[1],f=(0,d.useState)(!1),g=f[0],y=f[1],j=(0,d.useState)(!1),C=j[0],N=j[1],S=(0,d.useState)(""),A=S[0],D=S[1],T=(0,F.qc)({customConfig:{onSuccess:function(e){switch(e.type){case"login":y(!0);break;case"register":N(!0)}}}}).mutate;return(0,k.jsx)(_.Z,{condition:!o,fallback:(0,k.jsx)(_.Z,{condition:i,fallback:(0,k.jsx)(we,{authFeature:n,email:l,setOtpScreen:N,setIsModalOpen:t,backEnabled:!o}),children:(0,k.jsx)(be,{authFeature:n,setOtpScreen:y,email:l,setCurrentAuthFeature:r,setIsModalOpen:t,backEnabled:!o,setMobileViewHeight:c})}),children:(0,k.jsx)(_.Z,{condition:!C,fallback:(0,k.jsx)(we,{authFeature:n,email:A,setOtpScreen:N,setIsModalOpen:t,backEnabled:!o}),children:(0,k.jsx)(_.Z,{condition:!g,fallback:(0,k.jsx)(be,{authFeature:n,setOtpScreen:y,email:A,setCurrentAuthFeature:r,setIsModalOpen:t,backEnabled:!o,setMobileViewHeight:c,setPendingInvites:s,pendingInvites:a}),children:(0,k.jsx)("div",{className:"flex h-full flex-col justify-center ".concat(u?"px-4":"px-20"," text-center"),children:(0,k.jsxs)("div",{children:[(0,k.jsx)("h1",{className:"".concat(u?"text-lg":"text-xl"," font-medium text-textColor-skin-primary"),children:u?"Subscribe to my Newsletter":"Register on Tealfeed"}),(0,k.jsx)("p",{className:"mb-4 mt-1 text-sm text-textColor-skin-secondary",children:(0,k.jsx)(_.Z,{condition:u,fallback:(0,k.jsx)(k.Fragment,{children:"Subscribe to my newsletter by creating an account"}),children:(0,k.jsxs)("div",{className:"flex-col items-center",children:[(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:"text-textColor-skin-secondary",children:"Get notified whenever I publish something"})]}),(0,k.jsxs)("div",{className:"flex items-center",children:[(0,k.jsx)("p",{className:"mr-2",children:(0,k.jsx)(w,{})}),(0,k.jsx)("p",{className:" text-textColor-skin-secondary",children:"No Spam. Maximum 1 email per week"})]})]})})}),(0,k.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,k.jsx)(P.SV,{fallback:(0,k.jsx)(k.Fragment,{}),children:(0,k.jsx)(O.Z,{setIsModalOpen:t})}),(0,k.jsx)(M.Z,{onClick:function(){}})]}),m.length>0&&(0,k.jsx)("span",{className:"text-left text-xs text-red-500",children:m}),(0,k.jsx)(I.Z,{style:{color:"var(--border-primary)",border:50},children:(0,k.jsx)("span",{className:"font-normal text-textColor-skin-secondary",children:"or"})}),(0,k.jsx)(ke.Z,{variant:"login",handleSubmit:function(e){e.preventDefault(),(0,E.Z)(A)?T({email:A}):h("Invalid Email")},text:"Continue",setEmail:D,email:null!==l&&void 0!==l?l:A}),p.length>0&&(0,k.jsx)("div",{className:"mt-2 w-full text-left text-xs text-red-500",children:p}),(0,k.jsx)("p",{className:"mt-2 pb-1 text-left text-xs italic text-textColor-skin-secondary",children:"Note: Your email address will be visible to the creator once you subscribe to them"}),(0,k.jsxs)("div",{children:[(0,k.jsxs)("p",{className:"mt-6 text-xs text-textColor-skin-secondary",children:["By continuing, you agree to Tealfeed"," ",(0,k.jsx)(b(),{href:"/terms",target:"_blank",children:(0,k.jsx)("a",{target:"_blank",onClick:function(){return(0,Z.m4)("Terms")},className:"text-brandColor-skin-teal",children:"Terms"})})," ","and"," ",(0,k.jsx)(b(),{href:"/privacy",children:(0,k.jsx)("a",{target:"_blank",onClick:function(){return(0,Z.m4)("Privacy Policy")},className:"text-brandColor-skin-teal",children:"Privacy Policy"})})]}),(0,k.jsxs)("p",{className:"pt-2 text-xs text-textColor-skin-secondary",children:["Protected by reCAPTCHA and the Google"," ",(0,k.jsx)(b(),{href:"https://policies.google.com/privacy",children:(0,k.jsx)("a",{target:"_blank",className:"underline",children:"Privacy Policy"})})," ","and"," ",(0,k.jsx)(b(),{href:"https://policies.google.com/terms",target:"_blank",children:(0,k.jsx)("a",{target:"_blank",className:"underline",children:"Terms of Service"})})," ","apply."]}),(0,k.jsx)("p",{className:"pt-4 text-xs text-textColor-skin-secondary",children:"Tealfeed Pvt Ltd \xa92023"})]})]})})})})})}var Pe=Ie;function Oe(e){var t=e.setIsModalOpen,r=e.authFeature,n=e.setCurrentAuthFeature,s=e.setPendingInvites,a=e.otp,o=e.isLogin,i=e.email,l=e.setMobileViewHeight,c=e.setAuthType,u=e.pendingInvites,d=e.isExternal,m=e.isForgotPasswordEnabled;return function(){switch(r){case f.E6.default:return(0,k.jsx)(Ne,{authFeature:r,setIsModalOpen:t,setCurrentAuthFeature:n,setMobileViewHeight:l,setAuthType:c});case f.E6.connect:return(0,k.jsx)(Se,{authFeature:r,setCurrentAuthFeature:n,setIsModalOpen:t,setMobileViewHeight:l,email:i});case f.E6.newsletter:return(0,k.jsx)(Pe,{authFeature:r,setIsModalOpen:t,setCurrentAuthFeature:n,setPendingInvites:s,otp:a,isLogin:o,email:i,setMobileViewHeight:l,pendingInvites:u});case f.E6.forgotPassword:return(0,k.jsx)(Y,{setIsModalOpen:t,setMobileViewHeight:l,setCurrentAuthFeature:n,isExternal:d,email:i,isForgotPasswordEnabled:m});default:return(0,k.jsx)("div",{children:"Default"})}}()}Ie.defaultProps={otp:!1,isLogin:!1,email:null};var Me=Oe;function Ze(e){var t=e.authType,r=e.authFeature,n=(e.authAction,e.setIsModalOpen),s=e.otp,a=e.isLogin,o=e.email,i=e.setPendingInvites,l=e.pendingInvites,c=e.isExternal,u=e.isForgotPasswordEnabled,m=(0,d.useState)(r),x=m[0],p=m[1],h=(0,v.Z)().isMobile,g=(0,d.useState)(""),b=g[0],y=g[1],j=b.length>0?b:r===f.E6.default?"h-[466px]":r===f.E6.newsletter?"h-[500px]":"h-[425px]",w=(0,d.useState)(t),C=w[0],S=w[1];return(0,k.jsxs)("div",{className:"flex ".concat(h?j:"h-[32rem]"," w-full"),children:[(0,k.jsx)("div",{className:"".concat(h||l?"w-full":"w-[33rem]"),children:(0,k.jsx)(Me,{setIsModalOpen:n,authFeature:r,setCurrentAuthFeature:p,setPendingInvites:i,pendingInvites:l,otp:s,isLogin:a,email:o,setMobileViewHeight:y,setAuthType:S,isExternal:c,isForgotPasswordEnabled:u})}),(0,k.jsx)(_.Z,{condition:!h&&!l,children:(0,k.jsx)("div",{className:"w-[27rem]",children:(0,k.jsx)(N,{authType:C,authFeature:x,isForgotPasswordEnabled:u})})})]})}Oe.defaultProps={otp:null,isLogin:null,email:null,isExternal:!1,isForgotPasswordEnabled:!0};var Fe=Ze;function Ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?Ee(Object(r),!0).forEach((function(t){(0,o.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ze.defaultProps={otp:null,isLogin:null,email:null,isExternal:!1,isForgotPasswordEnabled:!0};var Ae=function(e){var t=e.authAction,r=e.authFeature,n=e.authType,s=e.setIsModalOpen,o=e.isModalOpen,c=e.otp,m=e.isLogin,f=e.email,g=e.redirectToHome,b=e.isExternal,y=e.isForgotPasswordEnabled,j=e.isAuthPage,w=void 0!==j&&j,C=(e.redirectUrl,(0,p.useRouter)()),N=(0,d.useState)(o),S=N[0],I=N[1],P=(0,d.useState)(!1),O=P[0],M=P[1],Z=(0,se.E)(),F=Z.authVerified,E=Z.setAuthVerified,_=(0,v.Z)().isMobile,A=(0,ee.Z)("authAction",null),D=(0,l.Z)(A,1)[0],T=(0,ee.Z)("authPayload",null),Q=(0,l.Z)(T,1)[0],L=(0,h.NL)(),q=(0,H.p)(),K=q.openErrorToast,U=(q.openSuccessToast,C.query.role),V=((0,J.AA)().mutate,(0,J._8)().mutate,(0,z.ti)({userId:Q,customConfig:{onMutate:function(){var e=(0,i.Z)(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L.cancelQueries(z.SW.getUserMetaDataQueryKey({userId:Q}));case 2:return t=L.getQueryData(z.SW.getUserMetaDataQueryKey({userId:Q})),L.setQueryData(z.SW.getUserMetaDataQueryKey({userId:Q}),(function(e){return _e(_e({},e),{},{isFollowed:!0})})),e.abrupt("return",{previousMetaData:t});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),onError:function(e,t,r){L.setQueryData(z.SW.getUserMetaDataQueryKey({userId:Q}),r.previousMetaData)},onSuccess:function(){},onSettled:function(){L.invalidateQueries(z.SW.getUserMetaDataQueryKey({userId:Q}))}}})),W=V.mutate,R=(0,G.Ty)().mutate,B=(0,X.Kb)({topicId:Q,customConfig:{onSuccess:function(){L.invalidateQueries(X.sM.getTopicMetaDataQueryKey({topicId:Q})),L.invalidateQueries($.sn.getDiscoverTopicsQueryKey)}}}).mutate,Y=(0,le.jl)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;K({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate,te=(0,le.Zi)({customConfig:{onSuccess:function(e){var t=e.url;window.location.href=t},onError:function(e){var t,r;K({title:"Something went wrong",subtitle:null===e||void 0===e||null===(t=e.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.errorMessage})}}}).mutate;(0,d.useEffect)((function(){F&&!b&&I(!1),F&&w&&C.push("client"===U?"https://app.tealfeed.com/u/home":"https://app.tealfeed.com")}),[F]);return(0,d.useEffect)((function(){var e=null;switch(D){case 1:e="follow user";break;case 2:e="subscribe newsletter";break;case 3:e="book call";break;case 4:e="follow topic"}(0,oe.qe)("sign-in-modal-opened",{userAgent:window.navigator.userAgent,source:C.asPath,sourceType:e,sourceData:Q})}),[]),(0,k.jsx)(a.Z,{open:S,footer:null,onCancel:function(){w||(g?C.push("/"):(O&&(!function(){switch(D){case 0:break;case 1:W(Q);break;case 2:subscribePublicationTier(Q);break;case 3:R(Q);break;case 4:B(Q);break;case 5:te(Q);break;case 6:Y(Q)}}(),E(!0)),I(!S),s(!o)))},closable:!w,closeIcon:(0,k.jsx)(x(),{src:"/Assets/X.svg",alt:"",height:24,width:24}),wrapProps:{style:{backdropFilter:"blur(5px)"}},bodyStyle:{background:"var(--background-secondary)",borderRadius:20,borderColor:"var(--border-primary)",padding:0},width:_?343:960,centered:!0,children:(0,k.jsx)(Fe,{authAction:t,authFeature:r,authType:n,setIsModalOpen:s,otp:c,isLogin:m,email:f,pendingInvites:O,setPendingInvites:M,isExternal:b,isForgotPasswordEnabled:y})})};Ae.defaultProps={otp:null,isLogin:null,email:null,redirectToHome:!1,redirectUrl:"/",isExternal:!1,isForgotPasswordEnabled:!0};var De=Ae},92836:function(e,t,r){var n,s,a,o;r.d(t,{B9:function(){return o},E6:function(){return s},Gr:function(){return n},g4:function(){return a}}),function(e){e[e.default=0]="default",e[e.login=1]="login",e[e.signup=2]="signup",e[e.password=3]="password",e[e.otpLogin=4]="otpLogin",e[e.otpSignup=5]="otpSignup"}(n||(n={})),function(e){e[e.default=0]="default",e[e.connect=1]="connect",e[e.newsletter=2]="newsletter",e[e.forgotPassword=3]="forgotPassword"}(s||(s={})),function(e){e[e.default=0]="default",e[e.subscribeNewsletter=1]="subscribeNewsletter",e[e.followUser=2]="followUser",e[e.BookCall=3]="BookCall",e[e.navigation=4]="navigation",e[e.subscribeFreeNewsletter=5]="subscribeFreeNewsletter",e[e.subscribePaidNewsletter=6]="subscribePaidNewsletter"}(a||(a={})),function(e){e[e.login=0]="login",e[e["follow-user"]=1]="follow-user",e[e["subscribe-newsletter"]=2]="subscribe-newsletter",e[e["connect-payment"]=3]="connect-payment",e[e["follow-topic"]=4]="follow-topic",e[e["newletter-guard"]=5]="newletter-guard",e[e["connect-guard"]=6]="connect-guard",e[e.comment=7]="comment",e[e["connect-package-payment"]=8]="connect-package-payment",e[e["connect-webinar-payment"]=9]="connect-webinar-payment",e[e["navigate-to"]=10]="navigate-to",e[e["subscribe-free-newsletter"]=11]="subscribe-free-newsletter",e[e["subscribe-paid-newsletter"]=12]="subscribe-paid-newsletter"}(o||(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.