PageSourceSearch

https://cdn.logitravel.it/babylon/myaccount/logitravel/client/entries/index.CjjAcLjM.js

js logitravel.it collected 2026-10-02 08:03:21 UTC 33,267 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/index.lScp13gD.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/index.DbJ6Lgxq.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/GoogleLogin.render.BlW-huSM.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/index.esm.oa-pl8IN.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/routes.C8LIrObR.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/index.CL4vRv0f.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/index.ruGWkIsk.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/index.6jWBESPM.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/useValue.BL33Bj0c.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/section.styled.BYCtmIVC.js"),window.__toCdnUrl("cdn-placeholder/babylon/myaccount/logitravel/client/chunks/constants.kZ3kFwet.js")])))=>i.map(i=>d[i]);
2import{r as i,j as o,I as a,a as t,e as b,i as D,b as K,aI as ge,aJ as ue,F as I,M as g,P as L,k,s as R,B as O,p as X,h as J,aK as he,z as Se,n as Le,u as ke,w as W,m as Z,Z as $,o as Y,l as Q,C as Ee,aL as be,aM as Fe,X as Ie,a5 as Te,a6 as je,q as Ne}from"../chunks/index.DbJ6Lgxq.js";import{L as Ae}from"../chunks/index.CL4vRv0f.js";import{R as q}from"../chunks/routes.C8LIrObR.js";import{a as ee,g as oe,e as te,t as ne}from"../chunks/index.ruGWkIsk.js";import{F as Re}from"../chunks/index.6jWBESPM.js";import{S as ve}from"../chunks/section.styled.BYCtmIVC.js";import{c as Oe,T as Ue,t as Me}from"../chunks/constants.kZ3kFwet.js";import"../chunks/useValue.BL33Bj0c.js";const T={ROOT:"/myaccount/login",FORGOT_PASSWORD:"/myaccount/sendresetpassword",CREATE_ACCOUNT:"/myaccount/createnewaccount"},ze=new Set([T.ROOT,T.CREATE_ACCOUNT,T.FORGOT_PASSWORD]),Be=(e,n)=>{const c=ze.has(e)?e:T.ROOT,s=n.length>0?`?${n}`:"",d=`${c}${s}`;`${globalThis.location.pathname}${globalThis.location.search}`!==d&&globalThis.history.pushState({url:d},"",d)},De={[T.ROOT]:"root",[T.CREATE_ACCOUNT]:"create-account",[T.FORGOT_PASSWORD]:"forgot-password"},Ge={root:T.ROOT,"create-account":T.CREATE_ACCOUNT,"forgot-password":T.FORGOT_PASSWORD},re=()=>globalThis.location===void 0?"root":De[globalThis.location.pathname]??"root",M=i.createContext({view:"root",navigateTo:e=>{},isForgotPasswordOpenedPanel:!1,setIsForgotPasswordOpenedPanel:e=>{},isCreateAccountOpenedPanel:!1,setIsCreateAccountOpenedPanel:e=>{},emailValue:"",setEmailValue:e=>{},showTooltip:!1,setShowTooltip:e=>{}}),we=e=>{const[n,c]=i.useState(re),[s,d]=i.useState(""),[r,u]=i.useState(!1),{children:h}=e,l=i.useCallback(m=>c(m),[]);i.useEffect(()=>{const m=new URL(document.location.toString(),document.location.origin).searchParams.toString();Be(Ge[n],m);const _=()=>c(re());return globalThis.addEventListener("popstate",_),()=>globalThis.removeEventListener("popstate",_)},[n]);const p=i.useMemo(()=>({view:n,navigateTo:l,isForgotPasswordOpenedPanel:n==="forgot-password",isCreateAccountOpenedPanel:n==="create-account",setIsForgotPasswordOpenedPanel:m=>l(m?"forgot-password":"root"),setIsCreateAccountOpenedPanel:m=>l(m?"create-account":"root"),emailValue:s,setEmailValue:d,showTooltip:r,setShowTooltip:u}),[n,l,s,r]);return o.jsx(M.Provider,{value:p,children:h})},ae=async(e,n)=>{const c={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,c)??{ok:!1};if(!s.ok||s.status!==200&&s.status!==204)throw new Error(s.statusText);return s.json()},Ve=(e,n={},c="")=>{const{params:s=[],responses:d={}}=n,[r,u]=i.useState(a.DEFAULT),[h,l]=i.useState(""),p=q.BABYLON_API_LOGIN_CREATE_ACCOUNT;return{onSubmitFormCreateAccount:i.useCallback(async _=>{(async w=>{try{const x=await oe(c);if(!x)throw u(a.ERROR),l("El token de reCAPTCHA no se generó."),new Error("El token de reCAPTCHA no se generó.");const f=e?.checkboxes?.map(S=>({[S.value]:w[S.value]})).reduce((S,P)=>({...S,...P}));let C=await te({email:w.myaccountCreateAccountEmail,offers:f?.Offers,communications:f?.Communications,callbackUrl:w.callbackUrl});return C={...C,recaptchaResponse:x},ne(s,C)}catch(x){console.error("recaptcha error",x)}})(_).then(w=>
2{w&&(u(a.LOADING),ae(p,w).then(x=>{const f=ee(x,d);f.ok?(u(a.SUCCESS),l("OK")):(u(a.ERROR),l(f.description??"Create account error"))}).catch(()=>{u(a.ERROR),l("Error: Your request has failed")}))}).catch(w=>{u(a.ERROR),console.error("Error: ",w),l("Generic error, please contact with the administrator")})},[e?.checkboxes,s,c,d,p]),createAccountStatus:r,createAccountResponseError:h}},$e=t.div.withConfig({displayName:"CommonPanel",componentId:"babylon-namespace__sc-cd05940b-0"})(["background-color:",";width:100%;","{background-color:",";}"],({theme:e})=>e.colors.white.base,({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.primary.base),qe=t(D).withConfig({displayName:"CommonPanelBackButton",componentId:"babylon-namespace__sc-cd05940b-1"})(["background-color:",";","{",";background-color:transparent;border:none;color:",";outline:none;position:absolute;right:-10px;top:-143px;}"],({theme:e})=>e.colors.white.base,({theme:e})=>e.media.phone.only,b({size:"larger"}),({theme:e})=>e.colors.white.base),He=t(K).withConfig({displayName:"CommonPanelBackButtonIcon",componentId:"babylon-namespace__sc-cd05940b-2"})(["font-size:30px;color:",";","{color:",";}"],({theme:e})=>e.colors.grays.base,({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.white.base),xe=e=>{const{handleClick:n,children:c,status:s}=e,d=ge(),r=ue(d);return o.jsxs($e,{"data-testid":"CommonPanel",children:[s!==a.SUCCESS&&o.jsx(qe,{onClick:n,"aria-label":"back-button",children:o.jsx(He,{className:r?"nico-cancel":"nico-arrow-left"})}),c]})},We=R(["",";",";",";border-color:",";","{",";}"],O({all:"1px solid"}),k({all:"4px"}),g({bottom:"20px"}),({theme:e})=>e.colors.grays.light,({theme:e})=>e.media.phone.only,k({all:"2px"})),Ye=t.section.withConfig({displayName:"CreateAccount",componentId:"babylon-namespace__sc-e7ac1ee1-0"})(["overflow:hidden;"]),Ke=t.div.withConfig({displayName:"Title",componentId:"babylon-namespace__sc-e7ac1ee1-1"})(["",";",";color:",";text-align:center;","{",";color:",";}"],b({size:"larger",height:"larger",weight:"medium"}),g({bottom:"22px"}),({theme:e})=>e.colors.grays.darker,({theme:e})=>e.media.phone.only,b({weight:"regular"}),({theme:e})=>e.colors.white.base),ie=t.div.withConfig({displayName:"Subtitle",componentId:"babylon-namespace__sc-e7ac1ee1-2"})(["",";",";color:",";text-align:center;","{",";",";color:",";}"],b({size:"medium",height:"base",weight:"light"}),g({bottom:"22px"}),({theme:e})=>e.colors.grays.darker,({theme:e})=>e.media.phone.only,b({size:"base",weight:"light"}),g({bottom:"30px"}),({theme:e})=>e.colors.white.base),Xe=t.fieldset.withConfig({displayName:"Wrapper",componentId:"babylon-namespace__sc-e7ac1ee1-3"})(["",";"],I({type:"flex",justify:"center",direction:"column"})),Je=t(J).withConfig({displayName:"Input",componentId:"babylon-namespace__sc-e7ac1ee1-4"})(["",""],We),Ze=t(he).withConfig({displayName:"Checkbox",componentId:"babylon-namespace__sc-e7ac1ee1-6"})(["",";","{& span{"," color:",";}}"],g({bottom:"10px"}),({theme:e})=>e.media.phone.only,b({size:"base"}),({theme:e})=>e.colors.white.base),Qe=t.div.withConfig({displayName:"MessageNotification",componentId:"babylon-namespace__sc-e7ac1ee1-7"})(["",";",";",";",";color:",";&.success{background-color:",";}&.error{background-color:",";}&--title{",";}"],b({size:"medium",height:"medium",weight:"regular"}),g({top:"0",x:"0",bottom:"12px"}),g({top:"8px"}),L({all:"8px"}),({theme:e})=>e.colors.white.base,({theme:e})=>e.colors.status.success,({theme:e})=>e.colors.status.danger,b({weight:"bold"})),eo=t(D).withConfig({displayName:"Submit",componentId:"babylon-namespace__sc-e7ac1ee1-9"})(["",";",";",";display:block;max-width:264px;position:relative;width:100%;","{",";max-width:100%;}"],b({size:"base",height:"base",weight:"medium"}),g({x:"auto",y:"0"}),L({all:"16px"}),({theme:e})=>e.media.phone.only,k({all:"2px"})),oo=X(["from{transform:rotate(0deg);}to{transform:rotate(360deg);}"]),to=t.div.withConfig({displayName:"SubmitSpinner",componentId:"babylon-namespace__sc-e7ac1ee1-10"})(["","{overflow:hidden;}","{height:100%;}width:100%;z-index:",";&::before{"," ",";"," animation:"," 1s infinite linear;border-color:",";border-left-color:transparent;border-style:solid;content:'';display:block;height:25px;width:25px;z-index:10;}"],({theme:e})=>e.media.desktop.up,({theme:e})=>e.media.desktop.down,({theme:e})=>e.zIndex.high,O({all:"2px"}),k({all:"50%"}),g({x:"auto",y:"0"}),oo,({theme:e})=>e.colors.white.base),no=t.div.withConfig({displayName:"LegalTextCheckboxes",componentId:"babylon-namespace__sc-e7ac1ee1-11"})(["",""],g({bottom:"24px"})),ao=t.a.withConfig({displayName:"LegalTextTitle",componentId:"babylon-namespace__sc-e7ac1ee1-12"})(["",";",";color:",";cursor:pointer;","{color:",";}"],b({size:"medium",height:"medium"}),g({bottom:"22px"}),({theme:e})=>e.colors.grays.darker,({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.white.base),so=t.div.withConfig({displayName:"TooltipContent",componentId:"babylon-namespace__sc-e7ac1ee1-13"})(["",";color:",";text-align:left;& strong{"," display:block;}","{",";","}"],b({size:"base",height:"base"}),({theme:e})=>e.colors.grays.darker,g({bottom:"12px"}),({theme:e})=>e.media.phone.only,L({x:"40px"}),b({weight:"light"})),ro=t(Se).withConfig({displayName:"TooltipElement",componentId:"babylon-namespace__sc-e7ac1ee1-14"})(["& > div{& > div{",";min-width:487px;}}& ::before{display:none;}"],L({x:"30px",y:"20px"})),io=t(Le).withConfig({displayName:"ModalElement",componentId:"babylon-namespace__sc-e7ac1ee1-15"})([""]),co=e=>{const n=ge(),c=ue(n),{emailValue:s,setEmailValue:d,showTooltip:r,setShowTooltip:u}=i.useContext(M),{literals:h={},endpoints:l={},status:p=a.DEFAULT,responseError:m="",legalText:_={}}=e??{},{sendEmailAgain:y="",emailPlaceholder:w="",questionEmailNotReceived:x="",createAccountTitle:f="",createAccountEmailTitle:C="",createAccountEmailSended:j=""}=h,{sendNewAccountMail:S={}}=l,{content:P=""}=S,F=i.useRef(null),{value:E,setTrue:N,setFalse:V}=ke(),z=()=>{switch(p){case a.LOADING:return o.jsx(to,{"date-testid":"CreateAccountLoading"});case a.SUCCESS:return y;default:return P}},B=o.jsx(so,{dangerouslySetInnerHTML:{__html:_?.content??""}});return o.jsxs(Ye,{"data-testid":"CreateAccount",children:[o.jsx(Ke,{children:p===a.SUCCESS?C:f}),o.jsx(ie,{children:p===a.SUCCESS&&o.jsx(W,{content:j.replace("#email#",`**${s}**`)})}),o.jsxs(Xe,{children:[p!==a.SUCCESS&&o.jsxs(o.Fragment,{children:[o.jsx("legend",{hidden:!0,"aria-hidden":!0,
2children:h?.passwordForgetTitle}),o.jsx(Je,{name:"myaccountCreateAccountEmail",type:"email",validate:[Z(),$(h?.notEmailErrorMessage??"Mandatory")],placeholder:w,disabled:p===a.LOADING,onChange:d})]}),p!==a.SUCCESS&&o.jsxs(o.Fragment,{children:[o.jsx(no,{children:_.checkboxes?.map((A,v)=>o.jsx(Ze,{name:A?.value??`NoName-${v}`,label:A.label,defaultValue:A.checked,disabled:p===a.LOADING,required:A.required},Y(`check-${v}`)))}),o.jsx(ao,{ref:F,href:"",onClick:A=>{A.preventDefault(),u(!r),N()},children:o.jsx(W,{content:_?.title??""})})]}),p===a.SUCCESS&&o.jsx(ie,{children:x}),p===a.ERROR&&o.jsx(Qe,{className:"error",children:m}),o.jsx(eo,{variant:"secondary",onClick:()=>{},children:z()})]}),r&&!c&&o.jsx(ro,{referenceElement:F.current,isNegative:!1,children:B}),c&&o.jsx(io,{visible:E,content:B,header:"",variant:"fullScreen",iconRight:"cancel",hide:V})]})},lo=t.div.withConfig({displayName:"CreateAccountPanel",componentId:"babylon-namespace__sc-72a7143d-0"})(["background-color:",";width:100%;","{background-color:",";}"],({theme:e})=>e.colors.white.base,({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.primary.base),po=e=>{const{setIsCreateAccountOpenedPanel:n}=i.useContext(M),{config:c={},legalText:s={}}=e,{literals:d,endpoints:r={},recaptchaToken:u=""}=c,{createAction:h}=r,{onSubmitFormCreateAccount:l,createAccountStatus:p,createAccountResponseError:m}=Ve(s,h,u),_=()=>n(!1);return o.jsx(lo,{"data-testid":"CreateAccountPanel",children:o.jsx(xe,{handleClick:_,status:p,children:o.jsx(Q,{onSubmit:l,children:o.jsx(co,{literals:d,endpoints:r,responseError:m,status:p,legalText:s})})})})},mo=(e={},n="")=>{const{params:c=[],responses:s={}}=e,[d,r]=i.useState(a.DEFAULT),[u,h]=i.useState(""),l=q.BABYLON_API_LOGIN_FORGOT_PASSWORD;return{onSubmitFormForgotPassword:i.useCallback(m=>{(async y=>{try{const w=await oe(n);if(!w)throw new Error("El token de reCAPTCHA no se generó.");let x=await te({email:y.myaccountForgotPasswordEmail,callbackUrl:y.callbackUrl});return x={...x,recaptchaResponse:w},ne(c,x)}catch(w){console.error("Error encrypting",w)}})(m).then(y=>{y&&(r(a.LOADING),ae(l,y).then(w=>{const x=ee(w,s);x.ok?(r(a.SUCCESS),h("OK")):(r(a.ERROR),console.log({response:x}),h(x.description??"Forgot password error"))}).catch(()=>{r(a.ERROR),h("Error: Your request has failed")}))}).catch(y=>{r(a.ERROR),console.error("Error: ",y),h("Generic error, please contact with the administrator")})},[c,n,s,l]),forgotPasswordStatus:d,forgotPasswordResponseError:u}},go=R(["",";",";",";border-color:",";","{",";}"],O({all:"1px solid"}),k({all:"4px"}),g({bottom:"20px"}),({theme:e})=>e.colors.grays.light,({theme:e})=>e.media.phone.only,k({all:"2px"})),uo=t.section.withConfig({displayName:"ForgotPassword",componentId:"babylon-namespace__sc-a80ecbc7-0"})(["overflow:hidden;position:relative;"]),ho=t.div.withConfig({displayName:"ForgotPasswordTitle",componentId:"babylon-namespace__sc-a80ecbc7-1"})(["",";",";color:",";text-align:center;","{",";color:",";}"],b({size:"larger",height:"larger",weight:"medium"}),g({bottom:"22px"}),({theme:e})=>e.colors.grays.darker,({theme:e})=>e.media.phone.only,b({weight:"regular"}),({theme:e})=>e.colors.white.base),ce=t.div.withConfig({displayName:"ForgotPasswordSubtitle",componentId:"babylon-namespace__sc-a80ecbc7-2"})(["",";",";color:",";text-align:center;","{",";",";color:",";}"],b({size:"medium",height:"base",weight:"light"}),g({bottom:"22px"}),({theme:e})=>e.colors.grays.darker,({theme:e})=>e.media.phone.only,b({size:"base",weight:"light"}),g({bottom:"30px"}),({theme:e})=>e.colors.white.base),bo=t.fieldset.withConfig({displayName:"ForgotPasswordWrapper",componentId:"babylon-namespace__sc-a80ecbc7-3"})(["",";"],I({type:"flex",justify:"center",direction:"column"})),wo=t(J).withConfig({displayName:"ForgotPasswordInput",componentId:"babylon-namespace__sc-a80ecbc7-4"})(["",""],go),xo=t.div.withConfig({displayName:"ForgotPasswordMessageNotification",componentId:"babylon-namespace__sc-a80ecbc7-7"})(["",";",";",";",";color:",";&.success{background-color:",";}&.error{background-color:",";}&--title{",";}"],b({size:"medium",height:"medium",weight:"regular"}
2),g({top:"0",x:"0",bottom:"12px"}),g({top:"8px"}),L({all:"8px"}),({theme:e})=>e.colors.white.base,({theme:e})=>e.colors.status.success,({theme:e})=>e.colors.status.danger,b({weight:"bold"})),fo=t(D).withConfig({displayName:"ForgotPasswordSubmit",componentId:"babylon-namespace__sc-a80ecbc7-9"})(["",";",";",";display:block;max-width:264px;position:relative;width:100%;","{",";max-width:100%;}"],b({size:"base",height:"base",weight:"medium"}),g({x:"auto",y:"0"}),L({all:"16px"}),({theme:e})=>e.media.phone.only,k({all:"2px"})),yo=X(["from{transform:rotate(0deg);}to{transform:rotate(360deg);}"]),Co=t.div.withConfig({displayName:"ForgotPasswordSubmitSpinner",componentId:"babylon-namespace__sc-a80ecbc7-10"})(["","{overflow:hidden;}","{height:100%;}width:100%;z-index:",";&::before{"," ",";"," animation:"," 1s infinite linear;border-color:",";border-left-color:transparent;border-style:solid;content:'';display:block;height:25px;width:25px;z-index:10;}"],({theme:e})=>e.media.desktop.up,({theme:e})=>e.media.desktop.down,({theme:e})=>e.zIndex.high,O({all:"2px"}),k({all:"50%"}),g({x:"auto",y:"0"}),yo,({theme:e})=>e.colors.white.base),_o=e=>{const{emailValue:n,setEmailValue:c}=i.useContext(M),{literals:s={},endpoints:d={},status:r=a.DEFAULT,responseError:u=""}=e??{},{passwordForgetTitle:h="",passwordForgetSubtitle:l="",passwordEmailSended:p="",passwordEmailTitle:m="",sendEmailAgain:_="",emailPlaceholder:y="",questionEmailNotReceived:w=""}=s,{sendResetPasswordMail:x={}}=d,{content:f=""}=x,C=()=>{switch(r){case a.LOADING:return o.jsx(Co,{"date-testid":"ForgotPasswordLoading"});case a.SUCCESS:return _;default:return f}};return o.jsxs(uo,{"data-testid":"ForgotPassword",children:[o.jsx(ho,{children:r===a.SUCCESS?m:h}),o.jsx(ce,{children:r===a.SUCCESS?o.jsx(W,{content:p.replace("#email#",`**${n}**`)}):l}),o.jsxs(bo,{children:[r!==a.SUCCESS&&o.jsxs(o.Fragment,{children:[o.jsx("legend",{hidden:!0,"aria-hidden":!0,children:s?.passwordForgetTitle}),o.jsx(wo,{name:"myaccountForgotPasswordEmail",type:"email",validate:[Z(),$(s?.notEmailErrorMessage??"Mandatory")],placeholder:y,disabled:r===a.LOADING,onChange:c})]}),r===a.SUCCESS&&o.jsx(ce,{children:w}),r===a.ERROR&&o.jsx(xo,{className:"error",children:u}),o.jsx(fo,{variant:"secondary",onClick:()=>{},children:C()})]})]})},Po=t.div.withConfig({displayName:"LoginForgotPasswordPanel",componentId:"babylon-namespace__sc-b31a5668-0"})(["background-color:",";width:100%;","{background-color:",";}"],({theme:e})=>e.colors.white.base,({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.primary.base),So=e=>{const{setIsForgotPasswordOpenedPanel:n}=i.useContext(M),{config:c={}}=e,{literals:s,endpoints:d={},recaptchaToken:r=""}=c,{sendResetPasswordEmailAction:u}=d,{onSubmitFormForgotPassword:h,forgotPasswordStatus:l,forgotPasswordResponseError:p}=mo(u,r),m=()=>n(!1);return o.jsx(Po,{"data-testid":"LoginForgotPasswordPanel",children:o.jsx(xe,{handleClick:m,status:l,children:o.jsx(Q,{onSubmit:h,children:o.jsx(_o,{literals:s,endpoints:d,responseError:p,status:l})})})})},fe=R(["",";",";",";border-color:",";","{",";}"],O({all:"1px solid"}),k({all:"4px"}),g({bottom:"20px"}),({theme:e})=>e.colors.grays.light,({theme:e})=>e.media.phone.only,k({all:"2px"})),Lo=t.section.withConfig({displayName:"LoginForm",componentId:"babylon-namespace__sc-3d9a08d8-0"})(["position:relative;overflow:hidden;"]),ko=t.h2.withConfig({displayName:"LoginFormTitle",componentId:"babylon-namespace__sc-3d9a08d8-1"})(["text-align:center;",";",";color:",";","{",";color:",";}"],b({size:"larger",height:"larger",weight:"medium"}),g({bottom:"22px"}),({theme:e})=>e.colors.grays.darker,({theme:e})=>e.media.phone.only,b({weight:"regular"}),({theme:e})=>e.colors.white.base),Eo=t.fieldset.withConfig({displayName:"LoginFormWrapper",componentId:"babylon-namespace__sc-3d9a08d8-2"})(["",";"],I({type:"flex",justify:"center",direction:"column"})),Fo=t(J).withConfig({displayName:"LoginFormInput",componentId:"babylon-namespace__sc-3d9a08d8-3"})(["",""],fe),Io=t(Re).withConfig({displayName:"LoginFormPasswordInput",componentId:"babylon-namespace__sc-3d9a08d8-4"})(["",""],fe),To=t(he).withConfig({displayName:"LoginFormCheckbox",componentId:"babylon-namespace__sc-3d9a08d8-5"})(["",";","{& span{color:",";","}}"],g({bottom:"10px"}),({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.white.base,b({size:"base"})),jo=t.div.withConfig({displayName:"LoginFormMessageNotification",componentId:"babylon-namespace__sc-3d9a08d8-6"})(["color:",";",";",";",";",";&.success{background-color:",";}&.error{background-color:",";}&--title{",";}"],({theme:e})=>e.colors.white.base,b({size:"medium",height:"medium",weight:"regular"}
2),g({top:"0",x:"0",bottom:"12px"}),L({all:"8px"}),g({top:"8px"}),({theme:e})=>e.colors.status.success,({theme:e})=>e.colors.status.danger,b({weight:"bold"})),No=t(D).withConfig({displayName:"LoginFormSubmit",componentId:"babylon-namespace__sc-3d9a08d8-8"})(["position:relative;display:block;width:100%;max-width:264px;",";",";",";","{max-width:100%;",";}"],g({x:"auto",y:"0"}),b({size:"base",height:"base",weight:"medium"}),L({all:"16px"}),({theme:e})=>e.media.phone.only,k({all:"2px"})),Ao=X(["from{transform:rotate(0deg);}to{transform:rotate(360deg);}"]),Ro=t.div.withConfig({displayName:"LoginFormSubmitSpinner",componentId:"babylon-namespace__sc-3d9a08d8-9"})(["","{overflow:hidden;}","{height:100%;}width:100%;z-index:",";&::before{"," ",";"," animation:"," 1s infinite linear;border-color:",";border-left-color:transparent;border-style:solid;content:'';display:block;height:25px;width:25px;z-index:10;}"],({theme:e})=>e.media.desktop.up,({theme:e})=>e.media.desktop.down,({theme:e})=>e.zIndex.high,O({all:"2px"}),k({all:"50%"}),g({x:"auto",y:"0"}),Ao,({theme:e})=>e.colors.white.base),vo=e=>{const{literals:n={},showRememberLogin:c=!1,status:s=a.DEFAULT,responseError:d=""}=e??{},{loginTitle:r="",emailPlaceholder:u="",passwordPlaceholder:h="",rememberLogin:l="",submitLabel:p=""}=n;return o.jsxs(Lo,{"data-testid":"Loginform",children:[o.jsx(ko,{children:r}),o.jsxs(Eo,{children:[o.jsx("legend",{"aria-hidden":"true",hidden:!0,children:n?.loginTitle}),o.jsx(Fo,{name:"myaccountLoginEmail",type:"email",validate:[Z(),$(n?.notEmailErrorMessage??"Mandatory")],placeholder:u,disabled:s===a.LOADING,"aria-label":u,autoComplete:"on"}),o.jsx(Io,{placeholder:h,name:"myaccountLoginPassword",validate:$(),mustValidateFormat:!1,disabled:s===a.LOADING,"aria-label":h,autoComplete:"on"}),c&&o.jsx(To,{name:"myaccountLoginEmailCheck",label:l,defaultValue:!1,disabled:s===a.LOADING}),s===a.ERROR&&o.jsx(jo,{className:"error",children:d}),o.jsx(No,{variant:"secondary",onClick:()=>{},children:s===a.LOADING?o.jsx(Ro,{}):p})]})]})},ye=e=>{const{endpoint:n={},recaptchaToken:c="",hasEncryptedParams:s=!0,url:d=""}=e,{params:r=[],responses:u={}}=n,[h,l]=i.useState(a.DEFAULT),[p,m]=i.useState("");return{onSubmitFormLogin:i.useCallback(async y=>{const{callbackUrl:w,...x}=y,f={...x},C={callbackUrl:w};(async S=>{try{let P;if(s?P=await te(f):P=S,c){const E=await oe(c);if(!E)throw new Error("El token de reCAPTCHA no se generó.");P={...P,recaptchaResponse:E}}return ne(r,{...P,...C})}catch(P){console.error("Error encrypting",P)}})(y).then(S=>{S&&(l(a.LOADING),ae(d,S).then(P=>{const F=ee(P,u),E=F.Data?.data?.url??"/myaccount/home";if(F.ok){l(a.SUCCESS),m("OK");const N=decodeURIComponent(E);Ee(N)}else l(a.ERROR),console.log("error",F.Data?.data),m(F.description??"Login error")}).catch(P=>{console.error("Error: ",P),l(a.ERROR),m("Error: Your request has failed")}))}).catch(S=>{l(a.ERROR),console.error("Error: ",S),m("Generic error, please contact with the administrator")})},[s,c,r,d,u]),loginStatus:h,loginResponseError:p}},Oo=i.lazy(()=>be(()=>import("../chunks/index.lScp13gD.js").then(e=>e.i),__vite__mapDeps([0,1]),import.meta.url).then(e=>"default"in e.default?{default:e.default.default}:{default:e.default})),Uo=({appId:e,endpoint:n,disabled:c=!1,children:s,returnUrl:d,...r})=>{const{onSubmitFormLogin:u,loginStatus:h,loginResponseError:l}=ye({endpoint:n,hasEncryptedParams:!1,url:q.BABYLON_API_LOGIN_EXTERNAL}),[p,m]=i.useState(!1),_=i.useCallback(f=>{(async()=>{try{if(!f?.accessToken){m(!1);return}await u({accessToken:f.accessToken,provider:"Facebook",callbackUrl:d})}catch(C){m(!1),console.error("Error during Facebook login:",C,h,l)}})()},[l,h,u,d]),y=i.useCallback(f=>()=>{m(!0),f.onClick?.()},[]),w=i.useCallback(f=>o.jsx(D,{"data-testid":"FacebookLoginButton",variant:"facebook",height:"auto",...r,disabled:!!f.forceDisabled||c||p,onClick:y(f),children:s}),[s,c,p,y,r]),x=i.useCallback(()=>m(!1),[]);return o.jsx(i.Suspense,{fallback:w({forceDisabled:!0}),children:o.jsx(Oo,{appId:e,onSuccess:_,onFail:x,render:w})})},Mo=e=>o.jsx(i.Suspense,{fallback:o.jsx("div",{}),children:o.jsx(Uo,{...e})}),zo=i.lazy(()=>be(()=>import("../chunks/GoogleLogin.render.BlW-huSM.js"),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10]),import.meta.url)),Bo=e=>o.jsx(i.Suspense,{fallback:o.jsx(Fe,{...e}),children:o.jsx(zo,{...e})}),Ce=()=>R(["",";",";",";",";",";border:inherit;flex-basis:33.3%;position:relative;"],k({all:"2px"}),I({type:"flex",justify:"center",align:"center"}),b({size:"medium",height:"medium",weight:"medium"}),g({right:"22px"}),L({x:"24px",y:"16px"})),_e=()=>R(["height:20px;background-repeat:no-repeat;",";"],g({left:"0",right:"8px"})),Do=t.div.withConfig({displayName:"Separator",componentId:"babylon-namespace__sc-a799eaeb-0"})(["position:relative;"]),le=t.hr.withConfig({displayName:"SeparatorHr",componentId:"babylon-namespace__sc-a799eaeb-1"})(["",";box-sizing:content-box;overflow:visible;background-color:",";",";height:1px;"],g({x:"0",y:"40px"}),({theme:e})=>e.colors.grays.lighter,O({all:"0"})),Go=t.div.withConfig({displayName:"AlternativesTitle",componentId:"babylon-namespace__sc-a799eaeb-2"})(["position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(-50%);color:",";",";background-color:",";",";white-space:nowrap;","{",";color:",";background-color:",";}"],({theme:e})=>e.colors.text.light,b({size:"medium",height:"medium",weight:"light"}),({theme:e})=>e.colors.white.base,L({y:"0",x:"12px"}),({theme:e})=>e.media.phone.only,b({size:"base"}),({theme:e})=>e.colors.white.base,({theme:e})=>e.colors.primary.base),Vo=t.div.withConfig({displayName:"SocialButtons",componentId:"babylon-namespace__sc-a799eaeb-3"})(["",";"],I({type:"flex",justify:"center"})),$o=t.div.withConfig({displayName:"OtherOptions",componentId:"babylon-namespace__sc-a799eaeb-4"})(["",";","{",";}"],I({type:"flex",justify:"space-between"}),({theme:e})=>e.media.phone.only,I({direction:"column",justify:"center",align:"center"})),qo=t.div.withConfig({displayName:"ForgotPasswordLeft",componentId:"babylon-namespace__sc-a799eaeb-5"})(["",";","{",";text-align:center;",";}"],I({type:"flex",direction:"column",align:"flex-start"}),({theme:e})=>e.media.phone.only,I({align:"center",justify:"center"}),g({bottom:"20px"})),Ho=t.div.withConfig({displayName:"ForgotPasswordRight",componentId:"babylon-namespace__sc-a799eaeb-6"})(["",";text-align:right;","{",";text-align:center;}"],I({type:"flex",direction:"column",align:"flex-end"}),({theme:e})=>e.media.phone.only,I({align:"center",justify:"center"})),de=t.div.withConfig({displayName:"ForgotPasswordTitle",componentId:"babylon-namespace__sc-a799eaeb-7"})(["color:",";",";","{",";}","{color:",";}"],({theme:e})=>e.colors.text.light,b({size:"medium",height:"medium",weight:"light"}),({theme:e})=>e.media.tabletPortrait.up,g({bottom:"4px"}),({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.white.base),pe=t(D).withConfig({displayName:"Link",componentId:"babylon-namespace__sc-a799eaeb-8"})(["text-transform:initial;",";display:initial;text-decoration:underline;",";cursor:pointer;","{color:",";}"],b({size:"medium",height:"medium",weight:"regular"}),L({all:"0"}),({theme:e})=>e.media.phone.only,({theme:e})=>e.colors.white.base),Wo=t(Mo).withConfig({displayName:"FacebookButton",componentId:"babylon-namespace__sc-a799eaeb-9"})(["",";background-color:",";"],Ce(),({theme:e})=>e.colors.thirdParty.facebook),Yo=t(K).withConfig({displayName:"FacebookIcon",componentId:"babylon-namespace__sc-a799eaeb-10"})(["",";width:15px;background-image:url('https://www.logitravel.com/comun/images/logos/svg/ico-facebook_neg.svg');&::before{content:'';background-color:",";}"],_e(),({theme:e})=>e.colors.thirdParty.facebook),Ko=t(Bo).withConfig({displayName:"GoogleButton",componentId:"babylon-namespace__sc-a799eaeb-11"})(["",";",";background-color:",";color:",";border-color:",";"],Ce(),O({all:"1px solid"}),({theme:e})=>e.colors.white.base,({theme:e})=>e.colors.text.light,({theme:e})=>e.border.color.base),Xo=t(K).withConfig({displayName:"GoogleIcon",componentId:"babylon-namespace__sc-a799eaeb-12"})(["",";width:20px;background-image:url('https://www.logitravel.com/comun/images/logos/svg/ico-google-color.svg');&::before{content:'';background-color:",";}"],_e(),({theme:e})=>e.colors.white.base),Jo=e=>{const{setIsForgotPasswordOpenedPanel:n,setIsCreateAccountOpenedPanel:c}=i.useContext(M),{literals:s={},externalLogins:d=[],endpoints:r={},returnUrl:u=""}=e??{},{thirdPartyLoginAction:h={}}=r,{externalLoginsLabel:l="",questionForgetPassword:p="",questionNotHaveAccount:m="",pressHere:_="",registerNow:y=""}=s,{reset:w}=Ie(),x=C=>{C.preventDefault(),w(),n(!0)},f=C=>{C.preventDefault(),w(),c(!0)};return o.jsxs(o.Fragment,{children:[o.jsxs(Do,{children:[o.jsx(le,{}),o.jsx(Go,{children:l})]}),o.jsx(Vo,{children:d.map(C=>{const{name:j="",content:S="",componentClass:P="",props:F={}}=C;if(S==="facebook"){const{config:E={}}=C,{appId:N=""}=E;return o.jsxs(Wo,{appId:N,endpoint:h,returnUrl:u,children:[o.jsx(Yo,{className:"nico-facebook"}),j]},Y(C))}if(P.toLowerCase()==="google"){const{config:E={}}=F;return o.jsxs(Ko,{appId:E?.appId??"",endpoint:h,returnUrl:u,children:[o.jsx(Xo,{className:"nico-google"}),j]},Y(C))}})}),o.jsx(le,{}),o.jsxs($o,{children:[o.jsxs(qo,{children:[o.jsx(de,{children:p}),o.jsx(pe,{"aria-label":p,onClick:x,size:"small",children:_})]}),o.jsxs(Ho,{children:[o.jsx(de,{children:m}),o.jsx(pe,{"aria-label":m,onClick:f,size:"small",children:y})]})]})]})},Zo=R([""," bottom:0;height:100%;left:100%;position:absolute;right:0;top:0;transition:left 0.5s;width:100%;"],({theme:e})=>e.zIndex.lower),Qo=R(["left:0;transition:left 0.5s;animation:0.5 normal;z-index:",";"],({theme:e})=>e.zIndex.low),et=t.div.withConfig({displayName:"Shared",componentId:"babylon-namespace__sc-ab295317-0"})(["position:relative;flex-basis:55%;"," ","{",";background-color:",";min-height:700px;}","{overflow:visible;",";background-color:",";}"],({removeoverflow:e})=>e==="true"?R(["overflow:inherit;"]):R(["overflow:hidden;"]),({theme:e})=>e.media.tabletPortrait.up,L({all:"48px"}),({theme:e})=>e.colors.white.base,({theme:e})=>e.media.phone.only,L({all:"0"}),({theme:e})=>e.colors.primary.base),ot=t.section.withConfig({displayName:"Form",componentId:"babylon-namespace__sc-ab295317-1"})([""]),me=t.section.withConfig({displayName:"Panel",componentId:"babylon-namespace__sc-ab295317-2"})(["",";background-color:",";",";",";&.is-visible{",";z-index:",";}","{",";background-color:",";}"],L({top:"48px",x:"48px",bottom:"48px"}),({theme:e})=>e.colors.white.base,k({all:"4px"}),Zo,Qo,({theme:e})=>e.zIndex.low,({theme:e})=>e.media.phone.only,L({all:"0"}),({theme:e})=>e.colors.primary.base),Pe=e=>{const{isForgotPasswordOpenedPanel:n,isCreateAccountOpenedPanel:c,showTooltip:s,setShowTooltip:d}=i.useContext(M),{config:r={},showRememberLogin:u=!1,legalText:h={},externalLogins:l=[]}=e??{},{literals:p={},endpoints:m={},recaptchaToken:_=""}=r,{loginAction:y}=m,{onSubmitFormLogin:w,loginStatus:x,loginResponseError:f}=ye({endpoint:y,recaptchaToken:_,hasEncryptedParams:!0,url:q.BABYLON_API_LOGIN_LOGIN}),[C,j]=i.useState(!1),[S,P]=i.useState(!1),[F,E]=i.useState(!1),[N,V]=i.useState(!1),z=50,B=globalThis.location!==void 0?globalThis.location.href:"",A=B.substring(B.indexOf("returnUrl"),B.length).replace("returnUrl=",""),v=i.useRef(null),G=i.useRef(null),U=i.useRef(null),se=()=>{U?.current&&(N||S)&&(U.current.hidden=!0),!N&&G.current&&(G.current.hidden=!0),!S&&v.current&&(v.current.hidden=!0)};return i.useEffect(()=>{n?(v.current&&(v.current.hidden=!1),E(!1),j(!0),setTimeout(()=>P(!0),z),d(!1)):setTimeout(()=>{P(!1),U?.current&&(U.current.hidden=!1)},z)},[n,d]),i.useEffect(()=>{c?(G.current&&(G.current.hidden=!1),j(!1),E(!0),setTimeout(()=>V(!0),z)):(d(!1),setTimeout(()=>{V(!1),U?.current&&(U.current.hidden=!1)},z))},[c,d]),o.jsxs(et,{"data-testid":"Shared",removeoverflow:s.toString(),children:[o.jsx(ot,{ref:U,children:o.jsxs(Q,{onSubmit:H=>w({email:H.myaccountLoginEmail,password:H.myaccountLoginPassword,rememberLogin:H.myaccountLoginEmailCheck,callbackUrl:A}),children:[o.jsx(vo,{literals:p,endpoints:m,showRememberLogin:u,status:x,responseError:f}),o.jsx(Jo,{literals:p,externalLogins:l,endpoints:m,returnUrl:A})]})}),C&&o.jsx(me,{ref:v,className:S?"is-visible":"",onTransitionEnd:se,children:o.jsx(So,{config:r})}),F&&o.jsx(me,{ref:G,className:N?"is-visible":"",onTransitionEnd:se,children:o.jsx(po,{config:r,legalText:h})})]})},tt=t(ve).withConfig({displayName:"LoginDesktopView",componentId:"babylon-namespace__sc-62cb80d9-0"})(["",";",";",";",";",";max-width:1060px;background-color:",";"],Te,k({all:"7px"}),I({type:"flex"}
2),g({top:"40px",bottom:"50px"}),L({all:"0"}),({theme:e})=>e.colors.white.base),nt=e=>o.jsx(we,{children:o.jsxs(tt,{children:[o.jsx(Ae,{...e.main}),o.jsx(Pe,{...e})]})}),at=t.div.withConfig({displayName:"LoginMobileView",componentId:"babylon-namespace__sc-d249c7af-0"})(["",";background-color:",";","{min-height:100dvh;}"],L({all:"32px"}),({theme:e})=>e.colors.primary.base,({theme:e})=>e.media.phone.only),st=t(je).withConfig({displayName:"LoginLogo",componentId:"babylon-namespace__sc-d249c7af-1"})(["width:300px;height:52px;",";"],g({x:"auto",y:"40px"})),rt=t.a.withConfig({displayName:"LinkHome",componentId:"babylon-namespace__sc-d249c7af-2"})([""]),it=e=>{const{logo:n={}}=e??{};return o.jsx(we,{children:o.jsxs(at,{children:[o.jsx(rt,{href:"/",children:n?.src&&o.jsx(st,{src:n.src})}),o.jsx(Pe,{...e})]})})},ct=Ne(nt,it);Oe({Component:ct,Template:Ue,layouts:["LayoutMyaccountLoginLogitravel","MLayoutMyaccountLoginLogitravel"],transformProps:e=>{const n=Me(e),c=n?.componentProps?.component1??n?.componentProps?.componentLogin;return{...n,componentProps:c.props}}});export{ye as u};
3//# sourceMappingURL=index.CjjAcLjM.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.