@cleartrip/ct-platform-login-module 4.3.11 → 4.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),t=require("react/jsx-runtime"),o=require("react"),i=require("@cleartrip/ct-design-toast"),r=require("@cleartrip/ct-design-spacer"),n=require("@cleartrip/ct-platform-drawer"),l=require("@cleartrip/ct-design-theme"),a=require("@cleartrip/ct-platform-login-form"),s=require("@cleartrip/ct-platform-utils"),d=require("classnames"),_=require("swiper/react"),g=require("swiper"),c=require("@cleartrip/ct-design-typography");function p(e){return e&&e.__esModule?e:{default:e}}var f=p(d),m=p(g);function u(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var x={loader:"index-module_loader__63LeU","With-full-opacity":"index-module_With-full-opacity__ZSY-U",loader__content:"index-module_loader__content__Q6kJl",loader__spinner:"index-module_loader__spinner__6B3AR","loader-rotate":"index-module_loader-rotate__efcf3",loader__heading:"index-module_loader__heading__7YZ3N",loader__text:"index-module_loader__text__1QcLi"};u(".index-module_loader__63LeU{align-items:center;background-color:hsla(0,0%,100%,.95);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:0}.index-module_loader__63LeU.index-module_With-full-opacity__ZSY-U{background-color:#fff}.index-module_loader__content__Q6kJl{max-width:280px;text-align:center}.index-module_loader__spinner__6B3AR{animation:index-module_loader-rotate__efcf3 .8s linear infinite;border:2px solid rgba(51,102,204,.3);border-radius:50%;border-top-color:#36c;display:inline-block;height:30px;margin-bottom:10px;position:relative;width:30px}.index-module_loader__heading__7YZ3N{color:#000;font-size:18px;font-weight:600;margin-bottom:5px}.index-module_loader__text__1QcLi{color:rgba(0,0,0,.8);font-size:16px;line-height:1.5}");var h=function(o){var i=o.title,r=o.message,n=o.className;return t.jsx("div",e.__assign({className:"".concat(x.utilswrapper," utilswrapper")},{children:t.jsx("div",e.__assign({className:f.default(x.loader,n)},{children:t.jsxs("div",e.__assign({className:x.loader__content},{children:[t.jsx("div",{className:x.loader__spinner}),t.jsx("h5",e.__assign({className:x.loader__heading},{children:i})),t.jsx("p",e.__assign({className:x.loader__text},{children:r}))]}))}))}))},A={mobileinput_footertext:"index-module_mobileinput_footertext__jPQ-g","mobileinput-seperator":"index-module_mobileinput-seperator__7Ewok",mobileinput_seperatortext:"index-module_mobileinput_seperatortext__-KDOp",slider_carousel_wrapper:"index-module_slider_carousel_wrapper__0SuGB",login_form:"index-module_login_form__tpSDz",nonUtilsSelector_toast:"index-module_nonUtilsSelector_toast__lvWmB",login_otp_error:"index-module_login_otp_error__o3y2L",login_otp_input:"index-module_login_otp_input__L-3P8",footer_text:"index-module_footer_text__nkeJv","swiper-custom-pagination":"index-module_swiper-custom-pagination__Ma1gV",otp_box_wrapper:"index-module_otp_box_wrapper__sM2Ba",otp_container:"index-module_otp_container__1CE4N",swiper:"index-module_swiper__r5-8U","swiper-slide":"index-module_swiper-slide__Zchn0"};u(".index-module_mobileinput_footertext__jPQ-g a{color:#0f6bff;text-decoration:none}.index-module_mobileinput-seperator__7Ewok{position:relative}.index-module_mobileinput_seperatortext__-KDOp{background:#fff;left:0;margin:0 auto;position:absolute;right:0;text-align:center;top:-10px;width:40px}.index-module_slider_carousel_wrapper__0SuGB{border-top-left-radius:16px;border-top-right-radius:16px;width:100dvw}.index-module_login_form__tpSDz{background-color:#fff;padding-left:16px;padding-right:16px}.index-module_nonUtilsSelector_toast__lvWmB{bottom:12px!important;margin-bottom:12px;margin:0 auto!important;padding:12px 16px!important;width:calc(100% - 48px)!important;z-index:2000}.index-module_login_otp_error__o3y2L{padding-top:4px}.index-module_login_otp_input__L-3P8{font-size:24px!important;font-style:normal;font-weight:600!important;height:56px!important;line-height:28px;padding:auto;text-align:center;width:56px!important}.index-module_footer_text__nkeJv{color:grey!important;font-size:12px!important}.index-module_swiper-custom-pagination__Ma1gV{--swiper-theme-color:#fff;--swiper-pagination-color:#fff;--swiper-pagination-bullet-inactive-color:#999;--swiper-pagination-bullet-inactive-opacity:1}.index-module_swiper-custom-pagination__Ma1gV *>span{height:6px;width:6px}.index-module_otp_box_wrapper__sM2Ba{margin-right:8px}.index-module_otp_container__1CE4N{display:flex;flex-direction:column;margin-top:24px}.index-module_swiper__r5-8U{height:100%;width:100%}.index-module_swiper__r5-8U .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-slide__Zchn0 img{display:block;height:100%;object-fit:fill;width:100%}");const C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADeCAYAAAAQAZoJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfySURBVHgB7d3fi13VGcfhlaamnZIhkZjUlAxGbAIRWqgX/v/XvelFoZFKcUKDI0bbaSZp2pofnbengyE4Zubstff+nrOfB4ZRGBFEP655z7vXvvDy6eNXDYA4P2kARBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFA/bTCnZ0fHX09ae/68tRfPW4Sf/by1S8dfO5dbu/hOg7kINNN68V1r337V2uE3qzinRPk0Femd3dZ+eWv1HSZ04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COS8/neBkjizLALN9IbMoocSZzaIQDO9uqFunVP0UOLMhhFoplcrd1NfQCTObCCBZh4935byNuLMhhJo5lGPfq+7cnce4swGE2jmc7DfRiXObDiBZj5DHlx5G3FmCwg08zrYb93Vhkjd5yzObDiBZl51iq7Tbi/ehMIWEWiG6XFh0Zf7rZuUOPf458LiCTTD9Li0qB7/7nGKfvCnnJPzpZ0GQwk0w+x2uCy/DD1FV5yT3r79i3O+7BZ+gEAzTJ2ge/w6P+QUffBFVpzLjkAznEAz3OuX6Q+x/1k7t4pzfaXp9ZsFiybQDHflvdbFefeiU+Nc70j0ISEdCDTD1WnxcqcT48PPz/ZzqXEuN2416EGg6ePm7dZFbWHUdaQ/JjnOdXLuNfJh8QSaPnqfok8bddQteKlxLnt3GvRy4eXTx68a9FCPVt///eq+5x5uftjatfdXO8U1n/7mq9W2R6obe63dEmj6EWj6qvHEWefI26RGG/c+7fPgDvyfEQd91SmyTr5LUnG++4k4051A018FeimRPomztTpGINCMYwmRFmdGZgbNuGob48H97bub+WSUY6zBiASa8dVWR314mLwed1a1Svir2/1WCuFHCDTTqVP04aNVrDftRC3MzECgmUftNf+z3ux9uIp13WTXa396qJopX3yntd2rq2tDr1w3ymAWAg0QyhYHQCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQDeATAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBog1H8BWw4BUG/aftkAAAAASUVORK5CYII=",v=[{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel1.png",placeholder:C},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel2.png",placeholder:C},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel3.png",placeholder:C}];var b=function(i){var r=i.src,n=i.placeholderSrc,l=i.onLoad,a=e.__rest(i,["src","placeholderSrc","onLoad"]),s=o.useState(n||r),d=s[0],_=s[1],g=o.useRef(l);return o.useEffect((function(){g.current=l}),[l]),o.useEffect((function(){var e=new Image;e.onload=function(){_(r),g.current&&g.current()},e.src=r}),[r]),t.jsx("img",e.__assign({src:d},a))},E="index-module_slides__container__9XVd4",y="index-module_slides__container--imageContainer__q0RuP";u(".index-module_slides__container__9XVd4{align-items:center;box-sizing:border-box;display:flex;gap:1.5rem;height:181px;justify-content:center;width:100%}.index-module_slides__container--imageContainer__q0RuP{align-self:flex-start;margin-top:2rem;width:112px}");var w=function(o){var i=o.textData,r=o.bgColor,n=o.imageUrl,l=o.altText;return t.jsxs("div",e.__assign({className:E,style:{backgroundColor:r}},{children:[t.jsx("div",e.__assign({className:y},{children:t.jsx(b,{width:128,height:128,alt:l,src:n})})),t.jsx("div",{children:null==i?void 0:i.map((function(o,i){return t.jsx(c.Typography,e.__assign({variant:c.TypographyVariant.HM2,style:e.__assign({color:o.textColor,lineHeight:"24px"},o.style)},{children:o.text}),i)}))})]}))},Q=function(){return[t.jsx(w,{bgColor:"#6D36E1",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_112,h_112,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins_2x_savings.png",altText:"supercoins_savings_icon",textData:[{text:"Get up to ₹1,200",textColor:"#fff",style:{fontWeight:"500"}},{text:"off with",textColor:"#fff",style:{fontWeight:"500"}},{text:"SuperCoins",textColor:"#fff",style:{fontWeight:"500"}}]},1),t.jsx(w,{bgColor:"#FF8057",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_hotels.png",altText:"hotel_pricing_icon",textData:[{text:"1st hotel booking: ",textColor:"#fff",style:{fontWeight:"500"}},{text:"Flat 25% off",textColor:"#fff",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},2),t.jsx(w,{bgColor:"#FFDA7B",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_flights.png",altText:"flight_pricing_icon",textData:[{text:"1st flight booking: ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Flat 10% off ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#332504",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},3),t.jsx(w,{bgColor:"#5295FF",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_business.png",altText:"cleartrip_for_work_icon",textData:[{text:"10% extra savings",textColor:"#fff",style:{fontWeight:"500"}},{text:"on business travel",textColor:"#fff",style:{fontWeight:"500"}},{text:"Cleartrip For Work",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},4),t.jsx(w,{bgColor:"#47C15A",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flikpart_myntra_benefits_loyality_icon",textData:[{text:"Up to 20% extra",textColor:"#fff",style:{fontWeight:"500"}},{text:"savings on hotels",textColor:"#fff",style:{fontWeight:"500"}}]},5),t.jsx(w,{bgColor:"#FF8862",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flights_cancellation_benefit_icon",textData:[{text:"Cancel flights at ",textColor:"#fff",style:{fontWeight:"500"}},{text:"no extra cost",textColor:"#fff",style:{fontWeight:"500"}},{text:"₹499",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",textDecoration:"line-through",display:"inline-block",marginRight:"4px",marginTop:"6px"}},{text:"₹1 for Flipkart &",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",display:"inline-block",marginTop:"6px"}},{text:"Myntra shoppers",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400"}}]},6)]};m.default.use([g.Autoplay,g.Navigation,g.Pagination]);var S=function(i){var r=i.customSlides,n=i.carouselImages,l=i.disableAutoScroll,a=o.useMemo((function(){return s.isEmpty(n)?v:n}),[n]);return t.jsx("div",e.__assign({className:" o-hidden p-relative ".concat(A.slider_carousel_wrapper)},{children:t.jsx(_.Swiper,e.__assign({loop:!0,slidesPerView:1,navigation:!1,autoplay:!l,pagination:{clickable:!0},className:"".concat(A.swiper," ").concat(A["swiper-custom-pagination"]),lazy:{loadPrevNextAmount:1}},{children:n&&n.length>0?null==a?void 0:a.map((function(o,i){return t.jsx(_.SwiperSlide,e.__assign({className:A["swiper-slide"]},{children:t.jsx(t.Fragment,{children:i<1?t.jsx(b,{src:o.src,placeholderSrc:o.placeholder,alt:"Slide ".concat(i+1),rel:"preload",fetchPriority:"high"}):t.jsx(b,{src:o.src,placeholderSrc:o.placeholder,alt:"Slide ".concat(i+1),loading:"lazy",className:"lazy"})})}),i)})):r&&r.length>0?null==r?void 0:r.map((function(o,i){return t.jsx(_.SwiperSlide,e.__assign({className:A["swiper-slide"]},{children:o}),i)})):Q().length&&Q().map((function(o,i){return t.jsx(_.SwiperSlide,e.__assign({className:A["swiper-slide"]},{children:o}),i)}))}))}))};exports.LoginModule=function(d){var _=d.fallbackUri,g=d.isDrawerOpen,c=d.skipProfileFlow,p=d.showCarousel,f=void 0===p||p,m=d.ravenPayload,u=void 0===m?{}:m,x=d.customSlides,C=d.carouselImages,v=void 0===C?[]:C,b=d.hotelsLoyaltyFlow,E=void 0!==b&&b,y=d.closeOnOutsideClick,w=void 0!==y&&y,Q=d.sendUserInsights,B=void 0===Q||Q,U=d.enableProfileFetch,j=void 0===U||U,F=d.disableAutoScroll,I=void 0!==F&&F,N=d.onAuthSuccess,k=d.onAuthFailure,P=d.handleLoginClose,D=d.fkLoginClick,T=o.useState(!1),W=T[0],q=T[1],z=o.useState(g),R=z[0],G=z[1],J=o.useState(!1),X=J[0],O=J[1],Z=o.useCallback((function(){O(!0)}),[]),L=o.useCallback((function(t){var o=s.getRavenEventProps(),i=e.__assign({login_type:"native",vertical:null==o?void 0:o.vertical,action_name:"login_successful",page_name:null==o?void 0:o.pageName,login_form:null==o?void 0:o.loginForm,login_new:t?"sign_up":"sign_in"},u);B?s.sendEventWithUserInsights("u_login_success",i):s.ravenSDKTrigger("u_login_success",i),j&&s.handleProfileFetch(),M(t)}),[u,c,B,E,j]);o.useEffect((function(){window&&(window.showSigninLoaderScreen=Z);var e=s.getQueryParam("fkSSOstatus");"signin"===e&&(s.isAndroidApp()&&s.updateNativeAndroidOnSignIn(),L()),"signup"===e&&(s.isAndroidApp()&&s.updateNativeAndroidOnSignIn(),L(!0)),"failure"===e&&k("FK")}),[]);var K=function(t){null==t||t.stopPropagation(),G(!1);var o=s.getRavenEventProps();s.ravenSDKTrigger("u_login_click",e.__assign({action_name:"login_prompt_dismissed",login_form:null==o?void 0:o.loginForm,login_type:"native",vertical:null==o?void 0:o.vertical,page_name:null==o?void 0:o.pageName},u)),P&&"function"==typeof P&&P()},M=o.useCallback((function(e){E?N(K):(N(),e||(K(),q(!0)))}),[E]);return o.useEffect((function(){if(g){G(!0);var t=s.getRavenEventProps();s.ravenSDKTrigger("u_login_popup",e.__assign({action_name:"login_prompt_opened",login_form:null==t?void 0:t.loginForm,login_type:"native",vertical:null==t?void 0:t.vertical,page_name:null==t?void 0:t.pageName},u))}else G(!1)}),[g]),t.jsx(l.ThemeProvider,{children:t.jsxs(t.Fragment,{children:[t.jsx(n.Drawer,e.__assign({direction:"bottom",isOpen:R,showClose:!0,overlay:!0,handleClose:K,onClose:function(){},closeOnOutsideClick:w},{children:t.jsx("div",e.__assign({className:"".concat(A.utilswrapper," utilswrapper")},{children:t.jsxs("div",e.__assign({style:{maxHeight:"calc(100dvh - 60px)",overflowY:"auto",borderRadius:"16px 16px 0 0"}},{children:[f&&t.jsx(S,{customSlides:x,carouselImages:v,disableAutoScroll:I}),t.jsxs("div",e.__assign({className:A.login_form},{children:[t.jsx("div",{children:t.jsx(r.Spacer,{className:"pt-6"})}),t.jsx(a.LoginForm,{isLoginModule:!0,fallbackUri:_,ravenPayload:u,skipProfileFlow:c,sendUserInsights:B,hotelsLoyaltyFlow:E,enableProfileFetch:j,onAuthFailure:k,onAuthSuccess:M,fkLoginClick:D})]}))]}))}))})),W&&t.jsx(i.Toast,{text:"Logged in successfully!",show:W,className:"".concat(A.nonUtilsSelector_toast),closeTimeout:2e3}),X&&t.jsx(h,{title:"Please wait",message:"Signing in...",className:"z-10 bg-white"})]})})};
|
|
1
|
+
"use strict";var e=require("tslib"),t=require("react/jsx-runtime"),o=require("react"),i=require("@cleartrip/ct-design-toast"),r=require("@cleartrip/ct-design-spacer"),n=require("@cleartrip/ct-platform-drawer"),l=require("@cleartrip/ct-design-theme"),a=require("@cleartrip/ct-platform-login-form"),s=require("@cleartrip/ct-platform-utils"),d=require("classnames"),_=require("swiper/react"),g=require("swiper"),c=require("@cleartrip/ct-design-typography");function p(e){return e&&e.__esModule?e:{default:e}}var f=p(d),m=p(g);function u(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var x={loader:"index-module_loader__63LeU","With-full-opacity":"index-module_With-full-opacity__ZSY-U",loader__content:"index-module_loader__content__Q6kJl",loader__spinner:"index-module_loader__spinner__6B3AR","loader-rotate":"index-module_loader-rotate__efcf3",loader__heading:"index-module_loader__heading__7YZ3N",loader__text:"index-module_loader__text__1QcLi"};u(".index-module_loader__63LeU{align-items:center;background-color:hsla(0,0%,100%,.95);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:0}.index-module_loader__63LeU.index-module_With-full-opacity__ZSY-U{background-color:#fff}.index-module_loader__content__Q6kJl{max-width:280px;text-align:center}.index-module_loader__spinner__6B3AR{animation:index-module_loader-rotate__efcf3 .8s linear infinite;border:2px solid rgba(51,102,204,.3);border-radius:50%;border-top-color:#36c;display:inline-block;height:30px;margin-bottom:10px;position:relative;width:30px}.index-module_loader__heading__7YZ3N{color:#000;font-size:18px;font-weight:600;margin-bottom:5px}.index-module_loader__text__1QcLi{color:rgba(0,0,0,.8);font-size:16px;line-height:1.5}");var h=function(o){var i=o.title,r=o.message,n=o.className;return t.jsx("div",e.__assign({className:"".concat(x.utilswrapper," utilswrapper")},{children:t.jsx("div",e.__assign({className:f.default(x.loader,n)},{children:t.jsxs("div",e.__assign({className:x.loader__content},{children:[t.jsx("div",{className:x.loader__spinner}),t.jsx("h5",e.__assign({className:x.loader__heading},{children:i})),t.jsx("p",e.__assign({className:x.loader__text},{children:r}))]}))}))}))},A={mobileinput_footertext:"index-module_mobileinput_footertext__jPQ-g","mobileinput-seperator":"index-module_mobileinput-seperator__7Ewok",mobileinput_seperatortext:"index-module_mobileinput_seperatortext__-KDOp",slider_carousel_wrapper:"index-module_slider_carousel_wrapper__0SuGB",login_form:"index-module_login_form__tpSDz",nonUtilsSelector_toast:"index-module_nonUtilsSelector_toast__lvWmB",login_otp_error:"index-module_login_otp_error__o3y2L",login_otp_input:"index-module_login_otp_input__L-3P8",footer_text:"index-module_footer_text__nkeJv","swiper-custom-pagination":"index-module_swiper-custom-pagination__Ma1gV",otp_box_wrapper:"index-module_otp_box_wrapper__sM2Ba",otp_container:"index-module_otp_container__1CE4N",swiper:"index-module_swiper__r5-8U","swiper-slide":"index-module_swiper-slide__Zchn0"};u(".index-module_mobileinput_footertext__jPQ-g a{color:#0f6bff;text-decoration:none}.index-module_mobileinput-seperator__7Ewok{position:relative}.index-module_mobileinput_seperatortext__-KDOp{background:#fff;left:0;margin:0 auto;position:absolute;right:0;text-align:center;top:-10px;width:40px}.index-module_slider_carousel_wrapper__0SuGB{border-top-left-radius:16px;border-top-right-radius:16px;width:100dvw}.index-module_login_form__tpSDz{background-color:#fff;padding-left:16px;padding-right:16px}.index-module_nonUtilsSelector_toast__lvWmB{bottom:12px!important;margin-bottom:12px;margin:0 auto!important;padding:12px 16px!important;width:calc(100% - 48px)!important;z-index:2000}.index-module_login_otp_error__o3y2L{padding-top:4px}.index-module_login_otp_input__L-3P8{font-size:24px!important;font-style:normal;font-weight:600!important;height:56px!important;line-height:28px;padding:auto;text-align:center;width:56px!important}.index-module_footer_text__nkeJv{color:grey!important;font-size:12px!important}.index-module_swiper-custom-pagination__Ma1gV{--swiper-theme-color:#fff;--swiper-pagination-color:#fff;--swiper-pagination-bullet-inactive-color:#999;--swiper-pagination-bullet-inactive-opacity:1}.index-module_swiper-custom-pagination__Ma1gV *>span{height:6px;width:6px}.index-module_otp_box_wrapper__sM2Ba{margin-right:8px}.index-module_otp_container__1CE4N{display:flex;flex-direction:column;margin-top:24px}.index-module_swiper__r5-8U{height:100%;width:100%}.index-module_swiper__r5-8U .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-slide__Zchn0 img{display:block;height:100%;object-fit:fill;width:100%}");const C="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADeCAYAAAAQAZoJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfySURBVHgB7d3fi13VGcfhlaamnZIhkZjUlAxGbAIRWqgX/v/XvelFoZFKcUKDI0bbaSZp2pofnbengyE4Zubstff+nrOfB4ZRGBFEP655z7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Xa396qJopX3yntd2rq2tDr1w3ymAWAg0QyhYHQCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQDeATAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBog1H8BWw4BUG/aftkAAAAASUVORK5CYII=",v=[{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel1.png",placeholder:C},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel2.png",placeholder:C},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel3.png",placeholder:C}];var b=function(i){var r=i.src,n=i.placeholderSrc,l=i.onLoad,a=e.__rest(i,["src","placeholderSrc","onLoad"]),s=o.useState(n||r),d=s[0],_=s[1],g=o.useRef(l);return o.useEffect((function(){g.current=l}),[l]),o.useEffect((function(){var e=new Image;e.onload=function(){_(r),g.current&&g.current()},e.src=r}),[r]),t.jsx("img",e.__assign({src:d},a))},E="index-module_slides__container__9XVd4",y="index-module_slides__container--imageContainer__q0RuP";u(".index-module_slides__container__9XVd4{align-items:center;box-sizing:border-box;display:flex;gap:1.5rem;height:181px;justify-content:center;width:100%}.index-module_slides__container--imageContainer__q0RuP{align-self:flex-start;margin-top:2rem;width:112px}");var w=function(o){var i=o.textData,r=o.bgColor,n=o.imageUrl,l=o.altText;return t.jsxs("div",e.__assign({className:E,style:{backgroundColor:r}},{children:[t.jsx("div",e.__assign({className:y},{children:t.jsx(b,{width:128,height:128,alt:l,src:n})})),t.jsx("div",{children:null==i?void 0:i.map((function(o,i){return t.jsx(c.Typography,e.__assign({variant:c.TypographyVariant.HM2,style:e.__assign({color:o.textColor,lineHeight:"24px"},o.style)},{children:o.text}),i)}))})]}))},Q=function(){return[t.jsx(w,{bgColor:"#6D36E1",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_112,h_112,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins_2x_savings.png",altText:"supercoins_savings_icon",textData:[{text:"Get up to ₹5,000",textColor:"#fff",style:{fontWeight:"500"}},{text:"off with",textColor:"#fff",style:{fontWeight:"500"}},{text:"SuperCoins",textColor:"#fff",style:{fontWeight:"500"}}]},1),t.jsx(w,{bgColor:"#FF8057",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_hotels.png",altText:"hotel_pricing_icon",textData:[{text:"1st hotel booking: ",textColor:"#fff",style:{fontWeight:"500"}},{text:"Flat 25% off",textColor:"#fff",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},2),t.jsx(w,{bgColor:"#FFDA7B",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_flights.png",altText:"flight_pricing_icon",textData:[{text:"1st flight booking: ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Flat 10% off ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#332504",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},3),t.jsx(w,{bgColor:"#5295FF",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_business.png",altText:"cleartrip_for_work_icon",textData:[{text:"10% extra savings",textColor:"#fff",style:{fontWeight:"500"}},{text:"on business travel",textColor:"#fff",style:{fontWeight:"500"}},{text:"Cleartrip For Work",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},4),t.jsx(w,{bgColor:"#47C15A",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flikpart_myntra_benefits_loyality_icon",textData:[{text:"Up to 20% extra",textColor:"#fff",style:{fontWeight:"500"}},{text:"savings on hotels",textColor:"#fff",style:{fontWeight:"500"}}]},5),t.jsx(w,{bgColor:"#FF8862",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flights_cancellation_benefit_icon",textData:[{text:"Cancel flights at ",textColor:"#fff",style:{fontWeight:"500"}},{text:"no extra cost",textColor:"#fff",style:{fontWeight:"500"}},{text:"₹499",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",textDecoration:"line-through",display:"inline-block",marginRight:"4px",marginTop:"6px"}},{text:"₹1 for Flipkart &",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",display:"inline-block",marginTop:"6px"}},{text:"Myntra shoppers",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400"}}]},6)]};m.default.use([g.Autoplay,g.Navigation,g.Pagination]);var S=function(i){var r=i.customSlides,n=i.carouselImages,l=i.disableAutoScroll,a=o.useMemo((function(){return s.isEmpty(n)?v:n}),[n]);return t.jsx("div",e.__assign({className:" o-hidden p-relative ".concat(A.slider_carousel_wrapper)},{children:t.jsx(_.Swiper,e.__assign({loop:!0,slidesPerView:1,navigation:!1,autoplay:!l,pagination:{clickable:!0},className:"".concat(A.swiper," ").concat(A["swiper-custom-pagination"]),lazy:{loadPrevNextAmount:1}},{children:n&&n.length>0?null==a?void 0:a.map((function(o,i){return t.jsx(_.SwiperSlide,e.__assign({className:A["swiper-slide"]},{children:t.jsx(t.Fragment,{children:i<1?t.jsx(b,{src:o.src,placeholderSrc:o.placeholder,alt:"Slide ".concat(i+1),rel:"preload",fetchPriority:"high"}):t.jsx(b,{src:o.src,placeholderSrc:o.placeholder,alt:"Slide ".concat(i+1),loading:"lazy",className:"lazy"})})}),i)})):r&&r.length>0?null==r?void 0:r.map((function(o,i){return t.jsx(_.SwiperSlide,e.__assign({className:A["swiper-slide"]},{children:o}),i)})):Q().length&&Q().map((function(o,i){return t.jsx(_.SwiperSlide,e.__assign({className:A["swiper-slide"]},{children:o}),i)}))}))}))};exports.LoginModule=function(d){var _=d.fallbackUri,g=d.isDrawerOpen,c=d.skipProfileFlow,p=d.showCarousel,f=void 0===p||p,m=d.ravenPayload,u=void 0===m?{}:m,x=d.customSlides,C=d.carouselImages,v=void 0===C?[]:C,b=d.hotelsLoyaltyFlow,E=void 0!==b&&b,y=d.closeOnOutsideClick,w=void 0!==y&&y,Q=d.sendUserInsights,B=void 0===Q||Q,U=d.enableProfileFetch,j=void 0===U||U,F=d.disableAutoScroll,I=void 0!==F&&F,N=d.onAuthSuccess,k=d.onAuthFailure,P=d.handleLoginClose,D=d.fkLoginClick,T=o.useState(!1),W=T[0],q=T[1],z=o.useState(g),R=z[0],G=z[1],J=o.useState(!1),X=J[0],O=J[1],Z=o.useCallback((function(){O(!0)}),[]),L=o.useCallback((function(t){var o=s.getRavenEventProps(),i=e.__assign({login_type:"native",vertical:null==o?void 0:o.vertical,action_name:"login_successful",page_name:null==o?void 0:o.pageName,login_form:null==o?void 0:o.loginForm,login_new:t?"sign_up":"sign_in"},u);B?s.sendEventWithUserInsights("u_login_success",i):s.ravenSDKTrigger("u_login_success",i),j&&s.handleProfileFetch(),M(t)}),[u,c,B,E,j]);o.useEffect((function(){window&&(window.showSigninLoaderScreen=Z);var e=s.getQueryParam("fkSSOstatus");"signin"===e&&(s.isAndroidApp()&&s.updateNativeAndroidOnSignIn(),L()),"signup"===e&&(s.isAndroidApp()&&s.updateNativeAndroidOnSignIn(),L(!0)),"failure"===e&&k("FK")}),[]);var K=function(t){null==t||t.stopPropagation(),G(!1);var o=s.getRavenEventProps();s.ravenSDKTrigger("u_login_click",e.__assign({action_name:"login_prompt_dismissed",login_form:null==o?void 0:o.loginForm,login_type:"native",vertical:null==o?void 0:o.vertical,page_name:null==o?void 0:o.pageName},u)),P&&"function"==typeof P&&P()},M=o.useCallback((function(e){E?N(K):(N(),e||(K(),q(!0)))}),[E]);return o.useEffect((function(){if(g){G(!0);var t=s.getRavenEventProps();s.ravenSDKTrigger("u_login_popup",e.__assign({action_name:"login_prompt_opened",login_form:null==t?void 0:t.loginForm,login_type:"native",vertical:null==t?void 0:t.vertical,page_name:null==t?void 0:t.pageName},u))}else G(!1)}),[g]),t.jsx(l.ThemeProvider,{children:t.jsxs(t.Fragment,{children:[t.jsx(n.Drawer,e.__assign({direction:"bottom",isOpen:R,showClose:!0,overlay:!0,handleClose:K,onClose:function(){},closeOnOutsideClick:w},{children:t.jsx("div",e.__assign({className:"".concat(A.utilswrapper," utilswrapper")},{children:t.jsxs("div",e.__assign({style:{maxHeight:"calc(100dvh - 60px)",overflowY:"auto",borderRadius:"16px 16px 0 0"}},{children:[f&&t.jsx(S,{customSlides:x,carouselImages:v,disableAutoScroll:I}),t.jsxs("div",e.__assign({className:A.login_form},{children:[t.jsx("div",{children:t.jsx(r.Spacer,{className:"pt-6"})}),t.jsx(a.LoginForm,{isLoginModule:!0,fallbackUri:_,ravenPayload:u,skipProfileFlow:c,sendUserInsights:B,hotelsLoyaltyFlow:E,enableProfileFetch:j,onAuthFailure:k,onAuthSuccess:M,fkLoginClick:D})]}))]}))}))})),W&&t.jsx(i.Toast,{text:"Logged in successfully!",show:W,className:"".concat(A.nonUtilsSelector_toast),closeTimeout:2e3}),X&&t.jsx(h,{title:"Please wait",message:"Signing in...",className:"z-10 bg-white"})]})})};
|
|
2
2
|
//# sourceMappingURL=ct-platform-login-module.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__rest as t}from"tslib";import{jsx as o,jsxs as i,Fragment as r}from"react/jsx-runtime";import{useState as n,useRef as l,useEffect as a,useMemo as d,useCallback as s}from"react";import{Toast as p}from"@cleartrip/ct-design-toast";import{Spacer as c}from"@cleartrip/ct-design-spacer";import{Drawer as m}from"@cleartrip/ct-platform-drawer";import{ThemeProvider as g}from"@cleartrip/ct-design-theme";import{LoginForm as _}from"@cleartrip/ct-platform-login-form";import{isEmpty as f,getRavenEventProps as u,sendEventWithUserInsights as x,ravenSDKTrigger as h,handleProfileFetch as A,getQueryParam as C,isAndroidApp as b,updateNativeAndroidOnSignIn as v}from"@cleartrip/ct-platform-utils";import w from"classnames";import{Swiper as y,SwiperSlide as E}from"swiper/react";import Q,{Autoplay as B,Navigation as U,Pagination as S}from"swiper";import{Typography as F,TypographyVariant as I}from"@cleartrip/ct-design-typography";function N(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var k={loader:"index-module_loader__63LeU","With-full-opacity":"index-module_With-full-opacity__ZSY-U",loader__content:"index-module_loader__content__Q6kJl",loader__spinner:"index-module_loader__spinner__6B3AR","loader-rotate":"index-module_loader-rotate__efcf3",loader__heading:"index-module_loader__heading__7YZ3N",loader__text:"index-module_loader__text__1QcLi"};N(".index-module_loader__63LeU{align-items:center;background-color:hsla(0,0%,100%,.95);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:0}.index-module_loader__63LeU.index-module_With-full-opacity__ZSY-U{background-color:#fff}.index-module_loader__content__Q6kJl{max-width:280px;text-align:center}.index-module_loader__spinner__6B3AR{animation:index-module_loader-rotate__efcf3 .8s linear infinite;border:2px solid rgba(51,102,204,.3);border-radius:50%;border-top-color:#36c;display:inline-block;height:30px;margin-bottom:10px;position:relative;width:30px}.index-module_loader__heading__7YZ3N{color:#000;font-size:18px;font-weight:600;margin-bottom:5px}.index-module_loader__text__1QcLi{color:rgba(0,0,0,.8);font-size:16px;line-height:1.5}");var D=function(t){var r=t.title,n=t.message,l=t.className;return o("div",e({className:"".concat(k.utilswrapper," utilswrapper")},{children:o("div",e({className:w(k.loader,l)},{children:i("div",e({className:k.loader__content},{children:[o("div",{className:k.loader__spinner}),o("h5",e({className:k.loader__heading},{children:r})),o("p",e({className:k.loader__text},{children:n}))]}))}))}))},P={mobileinput_footertext:"index-module_mobileinput_footertext__jPQ-g","mobileinput-seperator":"index-module_mobileinput-seperator__7Ewok",mobileinput_seperatortext:"index-module_mobileinput_seperatortext__-KDOp",slider_carousel_wrapper:"index-module_slider_carousel_wrapper__0SuGB",login_form:"index-module_login_form__tpSDz",nonUtilsSelector_toast:"index-module_nonUtilsSelector_toast__lvWmB",login_otp_error:"index-module_login_otp_error__o3y2L",login_otp_input:"index-module_login_otp_input__L-3P8",footer_text:"index-module_footer_text__nkeJv","swiper-custom-pagination":"index-module_swiper-custom-pagination__Ma1gV",otp_box_wrapper:"index-module_otp_box_wrapper__sM2Ba",otp_container:"index-module_otp_container__1CE4N",swiper:"index-module_swiper__r5-8U","swiper-slide":"index-module_swiper-slide__Zchn0"};N(".index-module_mobileinput_footertext__jPQ-g a{color:#0f6bff;text-decoration:none}.index-module_mobileinput-seperator__7Ewok{position:relative}.index-module_mobileinput_seperatortext__-KDOp{background:#fff;left:0;margin:0 auto;position:absolute;right:0;text-align:center;top:-10px;width:40px}.index-module_slider_carousel_wrapper__0SuGB{border-top-left-radius:16px;border-top-right-radius:16px;width:100dvw}.index-module_login_form__tpSDz{background-color:#fff;padding-left:16px;padding-right:16px}.index-module_nonUtilsSelector_toast__lvWmB{bottom:12px!important;margin-bottom:12px;margin:0 auto!important;padding:12px 16px!important;width:calc(100% - 48px)!important;z-index:2000}.index-module_login_otp_error__o3y2L{padding-top:4px}.index-module_login_otp_input__L-3P8{font-size:24px!important;font-style:normal;font-weight:600!important;height:56px!important;line-height:28px;padding:auto;text-align:center;width:56px!important}.index-module_footer_text__nkeJv{color:grey!important;font-size:12px!important}.index-module_swiper-custom-pagination__Ma1gV{--swiper-theme-color:#fff;--swiper-pagination-color:#fff;--swiper-pagination-bullet-inactive-color:#999;--swiper-pagination-bullet-inactive-opacity:1}.index-module_swiper-custom-pagination__Ma1gV *>span{height:6px;width:6px}.index-module_otp_box_wrapper__sM2Ba{margin-right:8px}.index-module_otp_container__1CE4N{display:flex;flex-direction:column;margin-top:24px}.index-module_swiper__r5-8U{height:100%;width:100%}.index-module_swiper__r5-8U .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-slide__Zchn0 img{display:block;height:100%;object-fit:fill;width:100%}");const z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADeCAYAAAAQAZoJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfySURBVHgB7d3fi13VGcfhlaamnZIhkZjUlAxGbAIRWqgX/v/XvelFoZFKcUKDI0bbaSZp2pofnbengyE4Zubstff+nrOfB4ZRGBFEP655z7vXvvDy6eNXDYA4P2kARBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFA/bTCnZ0fHX09ae/68tRfPW4Sf/by1S8dfO5dbu/hOg7k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YII=",W=[{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel1.png",placeholder:z},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel2.png",placeholder:z},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel3.png",placeholder:z}];var G=function(i){var r=i.src,d=i.placeholderSrc,s=i.onLoad,p=t(i,["src","placeholderSrc","onLoad"]),c=n(d||r),m=c[0],g=c[1],_=l(s);return a((function(){_.current=s}),[s]),a((function(){var e=new Image;e.onload=function(){g(r),_.current&&_.current()},e.src=r}),[r]),o("img",e({src:m},p))},T="index-module_slides__container__9XVd4",R="index-module_slides__container--imageContainer__q0RuP";N(".index-module_slides__container__9XVd4{align-items:center;box-sizing:border-box;display:flex;gap:1.5rem;height:181px;justify-content:center;width:100%}.index-module_slides__container--imageContainer__q0RuP{align-self:flex-start;margin-top:2rem;width:112px}");var J=function(t){var r=t.textData,n=t.bgColor,l=t.imageUrl,a=t.altText;return i("div",e({className:T,style:{backgroundColor:n}},{children:[o("div",e({className:R},{children:o(G,{width:128,height:128,alt:a,src:l})})),o("div",{children:null==r?void 0:r.map((function(t,i){return o(F,e({variant:I.HM2,style:e({color:t.textColor,lineHeight:"24px"},t.style)},{children:t.text}),i)}))})]}))},X=function(){return[o(J,{bgColor:"#6D36E1",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_112,h_112,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins_2x_savings.png",altText:"supercoins_savings_icon",textData:[{text:"Get up to ₹1,200",textColor:"#fff",style:{fontWeight:"500"}},{text:"off with",textColor:"#fff",style:{fontWeight:"500"}},{text:"SuperCoins",textColor:"#fff",style:{fontWeight:"500"}}]},1),o(J,{bgColor:"#FF8057",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_hotels.png",altText:"hotel_pricing_icon",textData:[{text:"1st hotel booking: ",textColor:"#fff",style:{fontWeight:"500"}},{text:"Flat 25% off",textColor:"#fff",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},2),o(J,{bgColor:"#FFDA7B",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_flights.png",altText:"flight_pricing_icon",textData:[{text:"1st flight booking: ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Flat 10% off ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#332504",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},3),o(J,{bgColor:"#5295FF",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_business.png",altText:"cleartrip_for_work_icon",textData:[{text:"10% extra savings",textColor:"#fff",style:{fontWeight:"500"}},{text:"on business travel",textColor:"#fff",style:{fontWeight:"500"}},{text:"Cleartrip For Work",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},4),o(J,{bgColor:"#47C15A",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flikpart_myntra_benefits_loyality_icon",textData:[{text:"Up to 20% extra",textColor:"#fff",style:{fontWeight:"500"}},{text:"savings on hotels",textColor:"#fff",style:{fontWeight:"500"}}]},5),o(J,{bgColor:"#FF8862",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flights_cancellation_benefit_icon",textData:[{text:"Cancel flights at ",textColor:"#fff",style:{fontWeight:"500"}},{text:"no extra cost",textColor:"#fff",style:{fontWeight:"500"}},{text:"₹499",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",textDecoration:"line-through",display:"inline-block",marginRight:"4px",marginTop:"6px"}},{text:"₹1 for Flipkart &",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",display:"inline-block",marginTop:"6px"}},{text:"Myntra shoppers",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400"}}]},6)]};Q.use([B,U,S]);var q=function(t){var i=t.customSlides,n=t.carouselImages,l=t.disableAutoScroll,a=d((function(){return f(n)?W:n}),[n]);return o("div",e({className:" o-hidden p-relative ".concat(P.slider_carousel_wrapper)},{children:o(y,e({loop:!0,slidesPerView:1,navigation:!1,autoplay:!l,pagination:{clickable:!0},className:"".concat(P.swiper," ").concat(P["swiper-custom-pagination"]),lazy:{loadPrevNextAmount:1}},{children:n&&n.length>0?null==a?void 0:a.map((function(t,i){return o(E,e({className:P["swiper-slide"]},{children:o(r,{children:o(G,i<1?{src:t.src,placeholderSrc:t.placeholder,alt:"Slide ".concat(i+1),rel:"preload",fetchPriority:"high"}:{src:t.src,placeholderSrc:t.placeholder,alt:"Slide ".concat(i+1),loading:"lazy",className:"lazy"})})}),i)})):i&&i.length>0?null==i?void 0:i.map((function(t,i){return o(E,e({className:P["swiper-slide"]},{children:t}),i)})):X().length&&X().map((function(t,i){return o(E,e({className:P["swiper-slide"]},{children:t}),i)}))}))}))},Z=function(t){var l=t.fallbackUri,d=t.isDrawerOpen,f=t.skipProfileFlow,w=t.showCarousel,y=void 0===w||w,E=t.ravenPayload,Q=void 0===E?{}:E,B=t.customSlides,U=t.carouselImages,S=void 0===U?[]:U,F=t.hotelsLoyaltyFlow,I=void 0!==F&&F,N=t.closeOnOutsideClick,k=void 0!==N&&N,z=t.sendUserInsights,W=void 0===z||z,G=t.enableProfileFetch,T=void 0===G||G,R=t.disableAutoScroll,J=void 0!==R&&R,X=t.onAuthSuccess,Z=t.onAuthFailure,O=t.handleLoginClose,L=t.fkLoginClick,j=n(!1),K=j[0],M=j[1],V=n(d),H=V[0],Y=V[1],$=n(!1),ee=$[0],te=$[1],oe=s((function(){te(!0)}),[]),ie=s((function(t){var o=u(),i=e({login_type:"native",vertical:null==o?void 0:o.vertical,action_name:"login_successful",page_name:null==o?void 0:o.pageName,login_form:null==o?void 0:o.loginForm,login_new:t?"sign_up":"sign_in"},Q);W?x("u_login_success",i):h("u_login_success",i),T&&A(),ne(t)}),[Q,f,W,I,T]);a((function(){window&&(window.showSigninLoaderScreen=oe);var e=C("fkSSOstatus");"signin"===e&&(b()&&v(),ie()),"signup"===e&&(b()&&v(),ie(!0)),"failure"===e&&Z("FK")}),[]);var re=function(t){null==t||t.stopPropagation(),Y(!1);var o=u();h("u_login_click",e({action_name:"login_prompt_dismissed",login_form:null==o?void 0:o.loginForm,login_type:"native",vertical:null==o?void 0:o.vertical,page_name:null==o?void 0:o.pageName},Q)),O&&"function"==typeof O&&O()},ne=s((function(e){I?X(re):(X(),e||(re(),M(!0)))}),[I]);return a((function(){if(d){Y(!0);var t=u();h("u_login_popup",e({action_name:"login_prompt_opened",login_form:null==t?void 0:t.loginForm,login_type:"native",vertical:null==t?void 0:t.vertical,page_name:null==t?void 0:t.pageName},Q))}else Y(!1)}),[d]),o(g,{children:i(r,{children:[o(m,e({direction:"bottom",isOpen:H,showClose:!0,overlay:!0,handleClose:re,onClose:function(){},closeOnOutsideClick:k},{children:o("div",e({className:"".concat(P.utilswrapper," utilswrapper")},{children:i("div",e({style:{maxHeight:"calc(100dvh - 60px)",overflowY:"auto",borderRadius:"16px 16px 0 0"}},{children:[y&&o(q,{customSlides:B,carouselImages:S,disableAutoScroll:J}),i("div",e({className:P.login_form},{children:[o("div",{children:o(c,{className:"pt-6"})}),o(_,{isLoginModule:!0,fallbackUri:l,ravenPayload:Q,skipProfileFlow:f,sendUserInsights:W,hotelsLoyaltyFlow:I,enableProfileFetch:T,onAuthFailure:Z,onAuthSuccess:ne,fkLoginClick:L})]}))]}))}))})),K&&o(p,{text:"Logged in successfully!",show:K,className:"".concat(P.nonUtilsSelector_toast),closeTimeout:2e3}),ee&&o(D,{title:"Please wait",message:"Signing in...",className:"z-10 bg-white"})]})})};export{Z as LoginModule};
|
|
1
|
+
import{__assign as e,__rest as t}from"tslib";import{jsx as o,jsxs as i,Fragment as r}from"react/jsx-runtime";import{useState as n,useRef as l,useEffect as a,useMemo as d,useCallback as s}from"react";import{Toast as p}from"@cleartrip/ct-design-toast";import{Spacer as c}from"@cleartrip/ct-design-spacer";import{Drawer as m}from"@cleartrip/ct-platform-drawer";import{ThemeProvider as g}from"@cleartrip/ct-design-theme";import{LoginForm as _}from"@cleartrip/ct-platform-login-form";import{isEmpty as f,getRavenEventProps as u,sendEventWithUserInsights as x,ravenSDKTrigger as h,handleProfileFetch as A,getQueryParam as C,isAndroidApp as b,updateNativeAndroidOnSignIn as v}from"@cleartrip/ct-platform-utils";import w from"classnames";import{Swiper as y,SwiperSlide as E}from"swiper/react";import Q,{Autoplay as B,Navigation as U,Pagination as S}from"swiper";import{Typography as F,TypographyVariant as I}from"@cleartrip/ct-design-typography";function N(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var k={loader:"index-module_loader__63LeU","With-full-opacity":"index-module_With-full-opacity__ZSY-U",loader__content:"index-module_loader__content__Q6kJl",loader__spinner:"index-module_loader__spinner__6B3AR","loader-rotate":"index-module_loader-rotate__efcf3",loader__heading:"index-module_loader__heading__7YZ3N",loader__text:"index-module_loader__text__1QcLi"};N(".index-module_loader__63LeU{align-items:center;background-color:hsla(0,0%,100%,.95);bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:0}.index-module_loader__63LeU.index-module_With-full-opacity__ZSY-U{background-color:#fff}.index-module_loader__content__Q6kJl{max-width:280px;text-align:center}.index-module_loader__spinner__6B3AR{animation:index-module_loader-rotate__efcf3 .8s linear infinite;border:2px solid rgba(51,102,204,.3);border-radius:50%;border-top-color:#36c;display:inline-block;height:30px;margin-bottom:10px;position:relative;width:30px}.index-module_loader__heading__7YZ3N{color:#000;font-size:18px;font-weight:600;margin-bottom:5px}.index-module_loader__text__1QcLi{color:rgba(0,0,0,.8);font-size:16px;line-height:1.5}");var D=function(t){var r=t.title,n=t.message,l=t.className;return o("div",e({className:"".concat(k.utilswrapper," utilswrapper")},{children:o("div",e({className:w(k.loader,l)},{children:i("div",e({className:k.loader__content},{children:[o("div",{className:k.loader__spinner}),o("h5",e({className:k.loader__heading},{children:r})),o("p",e({className:k.loader__text},{children:n}))]}))}))}))},P={mobileinput_footertext:"index-module_mobileinput_footertext__jPQ-g","mobileinput-seperator":"index-module_mobileinput-seperator__7Ewok",mobileinput_seperatortext:"index-module_mobileinput_seperatortext__-KDOp",slider_carousel_wrapper:"index-module_slider_carousel_wrapper__0SuGB",login_form:"index-module_login_form__tpSDz",nonUtilsSelector_toast:"index-module_nonUtilsSelector_toast__lvWmB",login_otp_error:"index-module_login_otp_error__o3y2L",login_otp_input:"index-module_login_otp_input__L-3P8",footer_text:"index-module_footer_text__nkeJv","swiper-custom-pagination":"index-module_swiper-custom-pagination__Ma1gV",otp_box_wrapper:"index-module_otp_box_wrapper__sM2Ba",otp_container:"index-module_otp_container__1CE4N",swiper:"index-module_swiper__r5-8U","swiper-slide":"index-module_swiper-slide__Zchn0"};N(".index-module_mobileinput_footertext__jPQ-g a{color:#0f6bff;text-decoration:none}.index-module_mobileinput-seperator__7Ewok{position:relative}.index-module_mobileinput_seperatortext__-KDOp{background:#fff;left:0;margin:0 auto;position:absolute;right:0;text-align:center;top:-10px;width:40px}.index-module_slider_carousel_wrapper__0SuGB{border-top-left-radius:16px;border-top-right-radius:16px;width:100dvw}.index-module_login_form__tpSDz{background-color:#fff;padding-left:16px;padding-right:16px}.index-module_nonUtilsSelector_toast__lvWmB{bottom:12px!important;margin-bottom:12px;margin:0 auto!important;padding:12px 16px!important;width:calc(100% - 48px)!important;z-index:2000}.index-module_login_otp_error__o3y2L{padding-top:4px}.index-module_login_otp_input__L-3P8{font-size:24px!important;font-style:normal;font-weight:600!important;height:56px!important;line-height:28px;padding:auto;text-align:center;width:56px!important}.index-module_footer_text__nkeJv{color:grey!important;font-size:12px!important}.index-module_swiper-custom-pagination__Ma1gV{--swiper-theme-color:#fff;--swiper-pagination-color:#fff;--swiper-pagination-bullet-inactive-color:#999;--swiper-pagination-bullet-inactive-opacity:1}.index-module_swiper-custom-pagination__Ma1gV *>span{height:6px;width:6px}.index-module_otp_box_wrapper__sM2Ba{margin-right:8px}.index-module_otp_container__1CE4N{display:flex;flex-direction:column;margin-top:24px}.index-module_swiper__r5-8U{height:100%;width:100%}.index-module_swiper__r5-8U .index-module_swiper-slide__Zchn0{height:auto}.index-module_swiper-slide__Zchn0 img{display:block;height:100%;object-fit:fill;width:100%}");const z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADeCAYAAAAQAZoJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfySURBVHgB7d3fi13VGcfhlaamnZIhkZjUlAxGbAIRWqgX/v/XvelFoZFKcUKDI0bbaSZp2pofnbengyE4Zubstff+nrOfB4ZRGBFEP655z7vXvvDy6eNXDYA4P2kARBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBoglEADhBJogFACDRBKoAFCCTRAKIEGCCXQAKEEGiCUQAOEEmiAUAINEEqgAUIJNEAogQYIJd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AOEEmiAUAINEEqgAUIJNEAogQYIJdAAoQQaIJRAA4QSaIBQAg0QSqABQgk0QCiBBggl0AChBBog1H8BWw4BUG/aftkAAAAASUVORK5CYII=",W=[{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel1.png",placeholder:z},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel2.png",placeholder:z},{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/carousel3.png",placeholder:z}];var G=function(i){var r=i.src,d=i.placeholderSrc,s=i.onLoad,p=t(i,["src","placeholderSrc","onLoad"]),c=n(d||r),m=c[0],g=c[1],_=l(s);return a((function(){_.current=s}),[s]),a((function(){var e=new Image;e.onload=function(){g(r),_.current&&_.current()},e.src=r}),[r]),o("img",e({src:m},p))},T="index-module_slides__container__9XVd4",R="index-module_slides__container--imageContainer__q0RuP";N(".index-module_slides__container__9XVd4{align-items:center;box-sizing:border-box;display:flex;gap:1.5rem;height:181px;justify-content:center;width:100%}.index-module_slides__container--imageContainer__q0RuP{align-self:flex-start;margin-top:2rem;width:112px}");var J=function(t){var r=t.textData,n=t.bgColor,l=t.imageUrl,a=t.altText;return i("div",e({className:T,style:{backgroundColor:n}},{children:[o("div",e({className:R},{children:o(G,{width:128,height:128,alt:a,src:l})})),o("div",{children:null==r?void 0:r.map((function(t,i){return o(F,e({variant:I.HM2,style:e({color:t.textColor,lineHeight:"24px"},t.style)},{children:t.text}),i)}))})]}))},X=function(){return[o(J,{bgColor:"#6D36E1",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_112,h_112,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins_2x_savings.png",altText:"supercoins_savings_icon",textData:[{text:"Get up to ₹5,000",textColor:"#fff",style:{fontWeight:"500"}},{text:"off with",textColor:"#fff",style:{fontWeight:"500"}},{text:"SuperCoins",textColor:"#fff",style:{fontWeight:"500"}}]},1),o(J,{bgColor:"#FF8057",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_hotels.png",altText:"hotel_pricing_icon",textData:[{text:"1st hotel booking: ",textColor:"#fff",style:{fontWeight:"500"}},{text:"Flat 25% off",textColor:"#fff",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},2),o(J,{bgColor:"#FFDA7B",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_flights.png",altText:"flight_pricing_icon",textData:[{text:"1st flight booking: ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Flat 10% off ",textColor:"#332504",style:{fontWeight:"500"}},{text:"Code: CTAPP",textColor:"#332504",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},3),o(J,{bgColor:"#5295FF",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_business.png",altText:"cleartrip_for_work_icon",textData:[{text:"10% extra savings",textColor:"#fff",style:{fontWeight:"500"}},{text:"on business travel",textColor:"#fff",style:{fontWeight:"500"}},{text:"Cleartrip For Work",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",marginTop:"6px"}}]},4),o(J,{bgColor:"#47C15A",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flikpart_myntra_benefits_loyality_icon",textData:[{text:"Up to 20% extra",textColor:"#fff",style:{fontWeight:"500"}},{text:"savings on hotels",textColor:"#fff",style:{fontWeight:"500"}}]},5),o(J,{bgColor:"#FF8862",imageUrl:"https://rukmini-ct.flixcart.com/f_auto,w_128,h_128,dpr_2/offermgmt-prod/offermgmt/images/banner/ct_loyality.png",altText:"flights_cancellation_benefit_icon",textData:[{text:"Cancel flights at ",textColor:"#fff",style:{fontWeight:"500"}},{text:"no extra cost",textColor:"#fff",style:{fontWeight:"500"}},{text:"₹499",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",textDecoration:"line-through",display:"inline-block",marginRight:"4px",marginTop:"6px"}},{text:"₹1 for Flipkart &",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400",display:"inline-block",marginTop:"6px"}},{text:"Myntra shoppers",textColor:"#fff",style:{fontSize:"14px",lineHeight:"20px",fontWeight:"400"}}]},6)]};Q.use([B,U,S]);var q=function(t){var i=t.customSlides,n=t.carouselImages,l=t.disableAutoScroll,a=d((function(){return f(n)?W:n}),[n]);return o("div",e({className:" o-hidden p-relative ".concat(P.slider_carousel_wrapper)},{children:o(y,e({loop:!0,slidesPerView:1,navigation:!1,autoplay:!l,pagination:{clickable:!0},className:"".concat(P.swiper," ").concat(P["swiper-custom-pagination"]),lazy:{loadPrevNextAmount:1}},{children:n&&n.length>0?null==a?void 0:a.map((function(t,i){return o(E,e({className:P["swiper-slide"]},{children:o(r,{children:o(G,i<1?{src:t.src,placeholderSrc:t.placeholder,alt:"Slide ".concat(i+1),rel:"preload",fetchPriority:"high"}:{src:t.src,placeholderSrc:t.placeholder,alt:"Slide ".concat(i+1),loading:"lazy",className:"lazy"})})}),i)})):i&&i.length>0?null==i?void 0:i.map((function(t,i){return o(E,e({className:P["swiper-slide"]},{children:t}),i)})):X().length&&X().map((function(t,i){return o(E,e({className:P["swiper-slide"]},{children:t}),i)}))}))}))},Z=function(t){var l=t.fallbackUri,d=t.isDrawerOpen,f=t.skipProfileFlow,w=t.showCarousel,y=void 0===w||w,E=t.ravenPayload,Q=void 0===E?{}:E,B=t.customSlides,U=t.carouselImages,S=void 0===U?[]:U,F=t.hotelsLoyaltyFlow,I=void 0!==F&&F,N=t.closeOnOutsideClick,k=void 0!==N&&N,z=t.sendUserInsights,W=void 0===z||z,G=t.enableProfileFetch,T=void 0===G||G,R=t.disableAutoScroll,J=void 0!==R&&R,X=t.onAuthSuccess,Z=t.onAuthFailure,O=t.handleLoginClose,L=t.fkLoginClick,j=n(!1),K=j[0],M=j[1],V=n(d),H=V[0],Y=V[1],$=n(!1),ee=$[0],te=$[1],oe=s((function(){te(!0)}),[]),ie=s((function(t){var o=u(),i=e({login_type:"native",vertical:null==o?void 0:o.vertical,action_name:"login_successful",page_name:null==o?void 0:o.pageName,login_form:null==o?void 0:o.loginForm,login_new:t?"sign_up":"sign_in"},Q);W?x("u_login_success",i):h("u_login_success",i),T&&A(),ne(t)}),[Q,f,W,I,T]);a((function(){window&&(window.showSigninLoaderScreen=oe);var e=C("fkSSOstatus");"signin"===e&&(b()&&v(),ie()),"signup"===e&&(b()&&v(),ie(!0)),"failure"===e&&Z("FK")}),[]);var re=function(t){null==t||t.stopPropagation(),Y(!1);var o=u();h("u_login_click",e({action_name:"login_prompt_dismissed",login_form:null==o?void 0:o.loginForm,login_type:"native",vertical:null==o?void 0:o.vertical,page_name:null==o?void 0:o.pageName},Q)),O&&"function"==typeof O&&O()},ne=s((function(e){I?X(re):(X(),e||(re(),M(!0)))}),[I]);return a((function(){if(d){Y(!0);var t=u();h("u_login_popup",e({action_name:"login_prompt_opened",login_form:null==t?void 0:t.loginForm,login_type:"native",vertical:null==t?void 0:t.vertical,page_name:null==t?void 0:t.pageName},Q))}else Y(!1)}),[d]),o(g,{children:i(r,{children:[o(m,e({direction:"bottom",isOpen:H,showClose:!0,overlay:!0,handleClose:re,onClose:function(){},closeOnOutsideClick:k},{children:o("div",e({className:"".concat(P.utilswrapper," utilswrapper")},{children:i("div",e({style:{maxHeight:"calc(100dvh - 60px)",overflowY:"auto",borderRadius:"16px 16px 0 0"}},{children:[y&&o(q,{customSlides:B,carouselImages:S,disableAutoScroll:J}),i("div",e({className:P.login_form},{children:[o("div",{children:o(c,{className:"pt-6"})}),o(_,{isLoginModule:!0,fallbackUri:l,ravenPayload:Q,skipProfileFlow:f,sendUserInsights:W,hotelsLoyaltyFlow:I,enableProfileFetch:T,onAuthFailure:Z,onAuthSuccess:ne,fkLoginClick:L})]}))]}))}))})),K&&o(p,{text:"Logged in successfully!",show:K,className:"".concat(P.nonUtilsSelector_toast),closeTimeout:2e3}),ee&&o(D,{title:"Please wait",message:"Signing in...",className:"z-10 bg-white"})]})})};export{Z as LoginModule};
|
|
2
2
|
//# sourceMappingURL=ct-platform-login-module.esm.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-platform-login-module",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.12",
|
|
4
4
|
"description": "Login Module Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/ct-platform-login-module.cjs.js",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@cleartrip/ct-design-toast": "^2.6.0",
|
|
17
17
|
"@cleartrip/ct-design-typography": "^3.13.0",
|
|
18
18
|
"swiper": "6.8.4",
|
|
19
|
-
"@cleartrip/ct-platform-login-form": "2.3.
|
|
20
|
-
"@cleartrip/ct-platform-utils": "4.3.
|
|
21
|
-
"@cleartrip/ct-platform-drawer": "4.3.
|
|
19
|
+
"@cleartrip/ct-platform-login-form": "2.3.12",
|
|
20
|
+
"@cleartrip/ct-platform-utils": "4.3.11",
|
|
21
|
+
"@cleartrip/ct-platform-drawer": "4.3.11"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=16.8.0",
|