PageSourceSearch

https://tealfeed.com/_next/static/chunks/9225.5cba6dbd6b7b0a59.js

js tealfeed.com collected 2026-09-24 08:40:18 UTC 12,039 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9225],{39225:function(e,i,o){o.r(i),o.d(i,{UserDetailsWebinarComponent:function(){return Z}});var n=o(67294),t=o(87536),a=o(11163),l=o(27484),d=o.n(l),r=o(91296),u=o.n(r),s=o(49155),c=o.n(s),v=o(85518),p=o(43870),m=o(29324),h=o(34572),f=o(58024),b=o(46220),y=o(54755),w=o(14611),g=o(10896),N=o(77278),x=o(46047),P=o(27849),I=o(82133),S=o(51406),k=o(85893),C=function(e){var i=e.control,o=e.orgId,n=e.formValues,t=e.submitHandler,a=e.handleSubmit,l=e.activeStep,d=e.isLoaderVisible,r=e.amount,u=e.currency,s=e.cancellationPolicyRequired,c=e.consentRequired,p=e.policies,m=e.paymentType,h=e.whatsappAskPreference,f=e.whatsappNumberRequired,C=function(){return 0===l?!n.fullName||!n.email||j&&!n.consentChecked||h===x.MW[0]&&f&&!n.whatsappNumber.phone:2===l&&(h===x.MW[1]&&f&&!n.whatsappNumber.phone)};function T(){return"paid"===m&&r>0?h===x.MW[1]?"Save and Finish":"Pay - ".concat(u," ").concat(r):(x.MW[1],"Save and Finish")}var j=!!(c&&p&&((null===p||void 0===p?void 0:p.consentDocumentUrl.length)>0||(null===p||void 0===p?void 0:p.privacyPolicyUrl.length)>0||(null===p||void 0===p?void 0:p.termsOfUseUrl.length)>0)),q=!(!s||null===p||void 0===p||!p.cancellationText||"<p></p>"===(null===p||void 0===p?void 0:p.cancellationText));return(0,k.jsxs)("form",{onSubmit:a(t),children:[(0,k.jsx)(g.Z,{condition:0===l,children:(0,k.jsx)(b.Z,{control:i,questionsLevel:null,whatsappAskPreference:h,orgId:o})}),(0,k.jsx)(g.Z,{condition:2===l&&h===x.MW[1],children:(0,k.jsx)(S.Z,{control:i,containerClass:"mb-6 mt-6"})}),(0,k.jsx)(g.Z,{condition:0===l&&q,children:(0,k.jsx)(P.Z,{cancellationPolicy:null===p||void 0===p?void 0:p.cancellationText,showCancellationPolicy:q})}),(0,k.jsx)(g.Z,{condition:0===l&&j,children:(0,k.jsx)(I.Z,{control:i,policies:p,showUserConsent:j})}),(0,k.jsxs)(g.Z,{condition:3!==l,children:[(0,k.jsx)(y.Z,{variant:"primary",className:"".concat(v.tq&&"hidden"," mt-2 h-10 w-full"),type:"submit",disabled:C(),children:d?(0,k.jsx)(w.Z,{height:4,width:4,color:"#fafafa"}):(0,k.jsx)("p",{className:" text-sm text-white",children:T()})}),(0,k.jsx)(N.n,{isLoading:d,isDisabled:C(),onClick:a(t),portalElementId:"noLoginSubmitButtonWrapper",children:(0,k.jsx)("p",{className:" text-sm text-white",children:T()})})]})]})};C.defaultProps={cancellationPolicyRequired:void 0,consentRequired:void 0,policies:void 0,whatsappAskPreference:void 0,whatsappNumberRequired:void 0};var T=C,j=o(3129),q=o(77566),M=o(7352),R=o(26606),F=o(9692),A=o(61247),W=o(16093),Z=function(e){var i,o,l,r,s,b,y,g,N,P,I,S,C,Z,E,D=e.clientIp,U=e.webinarInfoData,_=(0,a.useRouter)(),V=_.query,L=V.webinarId,B=V.orderId,O=V.userId,z=V.webinarBookingId,H=V.email,Y=_.asPath,J=(0,q.p)(),K=J.openErrorToast,X=J.openSuccessToast,G=J.openWarnToast,Q=(0,h.E)(),$=Q.authVerified,ee=Q.loggedInUser,ie=(0,n.useState)(0),oe=ie[0],ne=ie[1],te=(0,n.useState)(z||""),ae=te[0],le=te[1],de=(0,n.useState)(""),re=de[0],ue=de[1],se=(0,n.useState)(!1),ce=(se[0],se[1]),ve=(0,n.useState)(0),pe=ve[0],me=ve[1],he=(0,t.cI)({reValidateMode:"onSubmit",defaultValues:{fullName:null!==(i=null===ee||void 0===ee?void 0:ee.fullName)&&void 0!==i?i:"",email:null!==(o=null===ee||void 0===ee?void 0:ee.email)&&void 0!==o?o:"",consentChecked:!1,whatsappNumber:{countryCode:91,phone:""}}}),fe=he.control,be=he.handleSubmit,ye=he.setValue,we=he.getValues,ge=he.watch,Ne=(0,W.d8)({userId:null===ee||void 0===ee?void 0:ee.id,customConfig:{retry:!1,refetchOnWindowFocus:!1,onSuccess:function(e){e.whatsappNumber&&ye("whatsappNumber",e.whatsappNumber)}}}).refetch;(0,n.useEffect)((function(){$&&Ne()}),[$,null===ee||void 0===ee?void 0:ee.email]);var xe=(0,n.useCallback)((function(e){var i,o,n=e.tab,t=window.navigator.userAgent,a=(0,v.R2)(t),l=localStorage.getItem("prevPath");(0,A.P)("page-tracker-v2",{url:Y,referrer:document.referrer,source:l,prevPath:l,isMobile:v.tq,userAgent:t,IP:D,Browser:v.KC,OS:null!==(i=a.os)&&void 0!==i?i:a.osName,deviceType:null!==a&&void 0!==a&&a.isMobile?"Mobile":null!==a&&void 0!==a&&a.isTablet?"Tablet":"Desktop",device:null!==a&&void 0!==a&&a.isMobile?"".concat(null===a||void 0===a?void 0:a.vendor," ").concat(null===a||void 0===a?void 0:a.model):"not a mobile device",pageType:"Webinar Booking",tab:n,productId:L,creatorId:null===U||void 0===U||null===(o=U.author)||void 0===o?void 0:o._id,userId:null===ee||void 0===ee?void 0:ee.id})}),[null===U||void 0===U||null===(l=U.author)||void 0===l?void 0:l._id,L]),Pe=ge(),Ie=(0,a.useRouter)(),Se=Ie.query.transactionId,ke=null!==(r=null===Ie||void 0===Ie||null===(s=Ie.query)||void 0===s?void 0:s.couponCode)&&void 0!==r?r:"",Ce=(0,F.Fs)({transactionId:Se,customConfig:{refetchOnWindowFocus:!1,enabled:!!Se,onSuccess:function(e){"paid"===e.status?X({title:"Payment Successful",subt
1itle:"Your payment for package was successful"}):"created"===e.status&&"phonepe"===e.paymentProvider?G({title:"Payment response pending",subtitle:"Please check status again"}):K({title:"Payment Failed",subtitle:"Please Try payment again"})},onError:function(){K({title:"Payment Failed",subtitle:"Please Try payment again"})}}}),Te=Ce.data,je=Ce.refetch,qe=Ce.isFetching,Me=(0,j.zc)({orderId:B,userId:O,customConfig:{retry:!1,refetchOnWindowFocus:!1,enabled:!!O&&!!B&&"paid"===(null===Te||void 0===Te?void 0:Te.status),onSuccess:function(e){e._id&&le(e._id)},onError:function(e){B&&K({title:"Payment Failed",subtitle:"Please Try payment again"})}}}).isFetching;(0,n.useEffect)((function(){return function(){le(""),ne(0),ue("")}}),[]);var Re=(0,n.useMemo)((function(){return 0===(null===U||void 0===U?void 0:U.discountedPrice)||0===(null===U||void 0===U?void 0:U.price)}),[null===U||void 0===U?void 0:U.discountedPrice,null===U||void 0===U?void 0:U.price]);(0,n.useEffect)((function(){!ae||"paid"===(null===U||void 0===U?void 0:U.paymentType)&&0!==(null===U||void 0===U?void 0:U.discountedPrice)&&"paid"!==(null===Te||void 0===Te?void 0:Te.status)||(X({title:"Registration Successful",subtitle:"You have successfully registered for the webinar"}),(null===U||void 0===U?void 0:U.whatsappAskPreference)===x.MW[1]?ne(2):(xe({tab:"Whatsapp Reminder Page"}),ne(3),me((function(e){return e+1}))))}),[ae,Te,ne,me,X,Re]),(0,n.useEffect)((function(){B||z||xe({tab:"User Details"})}),[B,z]);var Fe=(0,j.sF)({customConfig:{onSuccess:function(e){if(0===(null===U||void 0===U?void 0:U.discountedPrice)||0===(null===U||void 0===U?void 0:U.price)||"paid"!==U.paymentType)le(null===e||void 0===e?void 0:e.webinarSubscriptionId);else{ce(!0);var i=e.url;i&&(window.location.href=i)}},onError:function(e){var i,o;K({title:"Booking failed",subtitle:(null===(i=e.response)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.errorMessage)||e.message})}}}),Ae=Fe.mutate,We=Fe.isLoading,Ze=(0,j.Px)().mutate,Ee=(0,j.SX)({customConfig:{onSuccess:function(){Ae({clientIp:D,userId:$?null===ee||void 0===ee?void 0:ee.id:re,webinarId:L,whatsappNumber:(null===U||void 0===U?void 0:U.whatsappAskPreference)===x.MW[0]&&Pe.whatsappNumber&&Pe.whatsappNumber.phone?Pe.whatsappNumber:void 0,couponCode:ke})},onError:function(e){var i,o;K({title:"Failed To Create Buyer For Org. Retry Again",subtitle:(null===(i=e.response)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.errorMessage)||e.message})}}}).mutate,De=(0,j.q8)({customConfig:{onSuccess:function(e){var i;null!==e&&void 0!==e&&e._id&&(ue(null===e||void 0===e?void 0:e._id),Ee({orgId:null!==(i=null===U||void 0===U?void 0:U.author.org)&&void 0!==i?i:"",buyerId:e._id,metaData:{name:we("fullName"),whatsappNumber:Pe.whatsappNumber}}))},onError:function(e){var i,o;K({title:"Failed to create user",subtitle:(null===(i=e.response)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.errorMessage)||e.message})}}}),Ue=De.mutate,_e=De.isLoading,Ve=(0,j.SJ)({data:{userId:$?null===ee||void 0===ee?void 0:ee.id:re||O,phoneNumber:(null===U||void 0===U?void 0:U.whatsappAskPreference)===x.MW[1]&&Pe.whatsappNumber&&Pe.whatsappNumber.phone?{contactNumber:Pe.whatsappNumber.phone,countryCode:Pe.whatsappNumber.countryCode}:void 0},webinarSubscriptionId:ae,customConfig:{enabled:!1,onSuccess:(0,n.useCallback)((function(){X({title:"Update Successful",subtitle:"Answers have been successfully updated."}),ne(3)}),[oe]),onError:function(e){var i,o,n;K({title:"Update Failed",subtitle:null!==(i=null===(o=e.response)||void 0===o||null===(n=o.data)||void 0===n?void 0:n.errorMessage)&&void 0!==i?i:""})}}}).refetch,Le=u()((function(){var e;if(0===oe)$?Ee({orgId:null!==(e=null===U||void 0===U?void 0:U.author.org)&&void 0!==e?e:"",buyerId:null===ee||void 0===ee?void 0:ee.id,metaData:{name:we("fullName"),whatsappNumber:Pe.whatsappNumber}}):Ue({fullName:we("fullName"),email:we("email")});else if(2===oe){var i;if(U.whatsappAskPreference===x.MW[1]&&Pe.whatsappNumber&&Pe.whatsappNumber.phone)Ze({orgId:U.author.org,buyerId:null!==(i=null===ee||void 0===ee?void 0:ee.id)&&void 0!==i?i:re,metaData:{whatsappNumber:{countryCode:Pe.whatsappNumber.countryCode,phone:Pe.whatsappNumber.phone}}});Ve()}}),300),Be=(0,n.useMemo)((function(){return We||_e}),[We,_e]);return Me?(0,k.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,k.jsx)(w.Z,{})}):qe?(0,k.jsx)(w.Z,{}):(0,k.jsxs)(k.Fragment,{children:[M.x.map((function(e){var i=e.x,o=e.y;return(0,k.jsx)(c(),{style:{position:"fixed",pointerEvents:"none",width:"100%",height:"100%",top:0,left:0,zIndex:0},fire:pe,startVelocity:30,spread:400,particleCount:150,origin:{x:i,y:o}})})),(0,k.jsx)("div",{className:" z-10 w-full max-w-[560px]",children:(0,k.jsxs)("div",{className:"md:custom-box-shadow h-screen bg-backgroundColor-skin-secondary px-4 py-6 md:mx-6 md:my-28 md:h-[max-content] md:rounded-2xl md:px-6",children:[3!==oe&&(0,k.jsx)(p.Z,{activeStep:oe,questionsLevel:null,paymentType:U.paymentType,amount:null!==(b=null!==(y=null===U||void 0===U?void 0:U.discountedPrice)&&void 0!==y?y:null===U||void 0===U?void 0:U.price)&&void 0!==b?b:0,whatsappAskPreference:null===U||void 0===U?void 0:U.whatsappAskPreference}),(0,k.jsx)(m.Z,{authorName:null===U||void 0===U||null===(g=U.author)||void 0===g?void 0:g.fullName,connectName:null===U||void 0===U?void 0:U.title,userName:null===U||void 0===U||null===(N=U.author)||void 0===N?void 0:N.userName,authorAvatar:null===U||void 0===U||null===(P=U.author)||void 0===P?void 0:P.avatar,connectType:"webinar",startTime:null===U||void 0===U?void 0:U.startDateTime,duration:+d()(null===U||void 0===U?void 0:U.endDateTime).diff(d()(null===U||void 0===U?void 0:U.startDateTime),"minute",!0).toFixed(0),AuthorUserName:null===U||void 0===U||null===(I=U.author)||void 0===I?void 0:I.userName,activeStep:oe,amount:null===U||void 0===U?void 0:U.price,discountedPrice:null===U||void 0===U?void 0:U.discountedPrice,currency:null===U||void 0===U?void 0:U.currency,paymentType:null===U||void 0===U?void 0:U.paymentType,offPlatformDetails:null===U||void 0===U?void 0:U.offPlatformDetails}),(0,k.jsx)(T,{control:fe,formValues:Pe,submitHandler:Le,orgId:null!==(S=null===U||void 0===U?void 0:U.author.org)&&void 0!==S?S:"",handleSubmit:be,activeStep:oe,isLoaderVisible:Be,amount:null!==(C=null!==(Z=null===U||void 0===U?void 0:U.discountedPrice)&&void 0!==Z?Z:null===U||void 0===U?void 0:U.price)&&void 0!==C?C:0,currency:null===U||void 0===U?void 0:U.currency,policies:null===U||void 0===U?void 0:U.policies,cancellationPolicyRequired:null===U||void 0===U?void 0:U.cancellationPolicyRequired,consentRequired:null===U||void 0===U?void 0:U.consentRequired,paymentType:null===U||void 0===U?void 0:U.paymentType,whatsappAskPreference:null===U||void 0===U?void 0:U.whatsappAskPreference,whatsappNumberRequired:null===U||void 0===U?void 0:U.whatsappNumberRequired}),3===oe&&(0,k.jsx)(f.Z,{userId:$?null===ee||void 0===ee?void 0:ee.id:re||O,connectType:"webinar",email:null!==(E=H)&&void 0!==E?E:Pe.email,bookingId:ae}),"phonepe"===(null===Te||void 0===Te?void 0:Te.paymentProvider)&&"created"===(null===Te||void 0===Te?void 0:Te.status)&&(0,k.jsx)(R.Z,{className:"my-2 w-full",onClick:function(){return je()}
1,variant:"tertiary",children:"Recheck status"})]})})]})}}}]);

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.