1import{j as e,u as T,ay as y,W as me,R as A,Z as he,bW as fe,A as V,b7 as ge,h as ce,n as je,d9 as be,cz as ye,cG as we,da as ve,db as ke}from"./index-DGdFi97V.js";import{r as D,R as Ae}from"./z_growthbook-DDPOUPAF.js";import{u as Z}from"./index-CDX5o1_G.js";import{H as Se}from"./HelpOutlineOutlined-BECXOHOK.js";import{T as le}from"./Tooltip-PsoTWu9G.js";import{E as Te,I as te}from"./IdInfoCard-b9tHZGrv.js";import{B as de}from"./Button-BglHMXc2.js";import{I as Ce}from"./InstructionsDialog-C2FrFcAR.js";import{S as u}from"./Stack-C6nygzqs.js";import{T as i}from"./Typography-DM7GHGsd.js";import{G as h}from"./Grid2-BM9j-IlM.js";import{u as R,a as pe}from"./useReduxHooks-C4sc6px9.js";import{H as Re}from"./HelpOutline-CBIOGUQl.js";import{B as I}from"./Box-BgNkknfM.js";import{D as De}from"./Divider-CtdS5BAB.js";import{E as Pe}from"./ExpandMore-xBDV8AZy.js";import{c as Ie}from"./createSvgIcon-BYEl2yRr.js";import{A as We,a as Fe,b as ze}from"./AccordionSummary-BOO_yPRL.js";import{T as U}from"./Trans-Y91zMhvJ.js";import{L as Le}from"./Link-Dv2IqnXz.js";import{A as Be}from"./ArrowForward-BevFLQAO.js";import{A as Me}from"./AppBanner-D1bSAo-v.js";import{A as H}from"./AddRounded-7gAOx7xB.js";import{L as Ee}from"./List-Bsf-weYy.js";import{L as _,a as K}from"./ListItemIcon-CPN7TbwG.js";import{L as Q}from"./ListItemText-DrXEA7XB.js";import{ButtonAdd as Oe,ButtonSkip as Ge}from"./Upsell-XU0F3Bn6.js";import{D as J}from"./Dialog-PubcGx0A.js";import{C as $e}from"./CircularProgress-C7CbTS1b.js";import{u as Ne}from"./useDispatch-Dkr-kMjs.js";import{u as Ue}from"./useLocalizedHistory-DsVKX6kG.js";import{D as qe}from"./DialogContent-zOZ8Q4XQ.js";import{R as He}from"./Radio-C42z0ue1.js";import{u as _e}from"./useMutation-BHNz9JmS.js";import{R as Ke}from"./RadioGroup-CvSWc01A.js";import{F as Qe}from"./FormControlLabel-B-OTxtPx.js";import{C as Xe}from"./CloseRounded-BVpxMofy.js";import{I as Ve}from"./IconButton-BNSJ1E2u.js";import{S as Ze}from"./Slide-B4V-N-GP.js";import{u as Je}from"./useTheme-xTqG0PMp.js";import{C as Ye}from"./Container-b0VKgVyc.js";import"./z_sentry-CN4Mehzd.js";import"./z_locales-C_LMmaHP.js";import"./getThemeProps-B8nbCB_C.js";import"./Screens-DoUXm_1-.js";import"./ClickAwayListener-vB_Vw9s1.js";import"./TransitionGroupContext-CVi2qG-b.js";import"./getReactElementRef-BXnGSse4.js";import"./ButtonBase-B0ls0evL.js";import"./createSimplePaletteValueFilter-IpranUEV.js";import"./generateUtilityClasses-YTZR_L31.js";import"./isFocusVisible-DV0ZM3iu.js";import"./useSlot-Bhx5btSF.js";import"./useControlled-DtpFAlnN.js";import"./Grow-q4yTlC3E.js";import"./Popper-CnJiPg9Q.js";import"./Modal-Ba2djPn2.js";import"./useSlotProps-B1kC6tl9.js";import"./Snackbar-CnI_0dtX.js";import"./Paper-C4QhLSb6.js";import"./index.esm-YDbwGYVF.js";import"./Instructions.styles-CtH7Q90E.js";import"./DialogTitle-c0dzef5a.js";import"./clsx-eT0YPcGk.js";import"./useThemeProps-Deu9J4CU.js";import"./isMuiElement-CgSKldbC.js";import"./dividerClasses-CLXQY17O.js";import"./Collapse-CKRjY4B2.js";import"./lib-CaOfn1qP.js";import"./index-Dzfu15TI.js";import"./isHostComponent-BVi1a3JX.js";import"./listItemTextClasses-Cb2rCx_S.js";import"./useTimeout-BP4D5pkB.js";import"./Radio-DPLCHF1b.js";import"./SwitchBase-D3Akygoa.js";import"./useFormControl-CVnjRj5a.js";import"./FormGroup-CxCWrYSY.js";import"./debounce-mlg6OZ42.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="3a0133b2-77d2-4ac6-9f9b-ee2f0e91c694",t._sentryDebugIdIdentifier="sentry-dbid-3a0133b2-77d2-4ac6-9f9b-ee2f0e91c694")}catch{}})();function et({onClick:t,children:r}){return e.jsx(de,{startIcon:e.jsx(Te,{}),onClick:t,disableElevation:!0,variant:"contained",type:"button",sx:{fontSize:12,fontWeight:600,textTransform:"capitalize",background:"linear-gradient(180deg, #FFF 0%, #FAFAFA 100%)",color:"#4A4B50",borderRadius:2,border:"1px solid #dfdfe7"},children:r})}function tt({carRentalProduct:t,isOnRequest:r}){const{t:n,i18n:{resolvedLanguage:d}}=T(),{car:l,supplier:a,extras:c,searchArgs:p,stationPair:{pickup:o,dropOff:f}}
1=t,[g,m]=D.useState(!1),v=o.airport&&o.airportBranchType,C={OFFICE:"atTerminal",SHUTTLE:"freeShuttle",MEET_GREET:"meetGreet"},j=y.getTransmission(l.classCode);return e.jsxs(e.Fragment,{children:[e.jsxs(u,{bgcolor:"white",border:"1px solid #DBDDE2",borderRadius:3,py:2.5,px:{xs:1.5,desktop:2.5},children:[e.jsxs(i,{noWrap:!0,textTransform:"capitalize",color:"primary",fontWeight:600,display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:1,children:[n("xo2:reservationDetails"),e.jsx("img",{src:a.logoUrl,alt:"supplier",height:32})]}),r&&e.jsxs(u,{useFlexGap:!0,direction:"row",alignSelf:"end",alignItems:"center",mt:1,children:[e.jsx("img",{src:"/icons/status-blue.svg",alt:"status",height:16,width:16}),e.jsx(i,{variant:"body2",fontWeight:500,mr:.5,children:n("success:onRequest")}),e.jsx(le,{title:n("success:onrequestMessage"),children:e.jsx(Se,{htmlColor:"#5D5E64",fontSize:"small"})})]}),e.jsxs(h,{container:!0,alignItems:"center",spacing:2,mt:2,children:[e.jsx(h,{width:{xs:"100%",desktop:"auto"},textAlign:"center",children:e.jsx("img",{src:l.imageUrl,alt:"car",height:120,onError:w=>w.target.src="/images/placeholder-car.png"})}),e.jsxs(h,{children:[e.jsx(i,{fontWeight:600,children:l.groupDescription}),e.jsx(i,{variant:"body2",fontWeight:500,children:l.name}),e.jsxs(h,{container:!0,gap:1.5,fontWeight:500,mt:1,children:[e.jsxs(i,{variant:"caption",display:"flex",alignItems:"center",gap:.25,fontWeight:500,children:[e.jsx("img",{src:`/icons/${j.toLowerCase()}-dark.svg`,alt:"transmission",height:16}),l.transmissionDescription]}),e.jsxs(i,{variant:"caption",display:"flex",alignItems:"center",gap:.25,fontWeight:500,children:[e.jsx("img",{src:"/icons/seat-dark.svg",alt:"seat",height:16}),l.seatCount]}),c.insured&&e.jsxs(i,{variant:"caption",display:"flex",alignItems:"center",gap:.25,fontWeight:500,children:[e.jsx("img",{src:"/icons/insurance-dark.svg",alt:"insured",height:16}),n("carListing:insurance")]})]})]})]}),e.jsxs(h,{container:!0,mt:4,spacing:.5,wrap:"nowrap",children:[e.jsx(h,{mt:.25,children:e.jsx("img",{src:"/icons/pickup-dark.svg",alt:"pickup",height:16})}),e.jsxs(h,{children:[e.jsx(i,{fontWeight:600,children:n("xo2:Pickup")}),e.jsx(i,{variant:"body2",children:y.failSafeLocation(o)}),e.jsx(i,{variant:"body2",children:y.formatDate(p.pickupDateStr,d)}),v&&e.jsxs(i,{gap:.5,fontWeight:500,border:"1px solid #DBDDE2",alignItems:"center",variant:"caption",display:"flex",width:"min-content",borderRadius:1,bgcolor:"#F8F9FC",p:.5,noWrap:!0,mt:.5,children:[e.jsx("img",{src:`/icons/${o.airportBranchType.toLowerCase().replace("_","-")}.svg`,alt:"terminal-tag",height:16}),n(`xo1:${C[o.airportBranchType]}`)]})]})]}),e.jsxs(h,{container:!0,mt:2,spacing:.5,wrap:"nowrap",children:[e.jsx(h,{mt:.25,children:e.jsx("img",{src:"/icons/dropoff-dark.svg",alt:"dropoff",height:16})}),e.jsxs(h,{children:[e.jsx(i,{fontWeight:600,children:n("xo2:Dropoff")}),e.jsx(i,{variant:"body2",children:y.failSafeLocation(f)}),e.jsx(i,{variant:"body2",children:y.formatDate(p.dropOffDateStr,d)})]})]}),e.jsx(h,{mt:2,children:e.jsx(et,{onClick:()=>m(!0),children:n("confirmation:btnInstructions")})})]}),e.jsx(Ce,{open:g,onClose:()=>m(!1)})]})}function ie({onClick:t=()=>{}}){const{t:r}=T(),{ancillaryProducts:n=[],selectedAncillaries:d=[]}=R(s=>s.xo1Details),l=R(s=>s.carlaPlus),a=R(s=>s.carRentalProduct),{creditsUsed:c}=R(s=>s.carlaCash),p=R(s=>s.childSeat),o=n==null?void 0:n.filter(s=>d.includes(s.id)),{priceInfoExtras:f,extras:g}=a,{discountedDeposit:m,fullDeposit:v,remainder:C,currency:j,subtotal:w,discountedTotal:L,fullyPrepaid:S,taxesAndFees:b,actualDeposit:P}=a.price,B=(o==null?void 0:o.reduce((s,k)=>s+k.price.price,0))??0,O=(p==null?void 0:p.reduce((s,k)=>s+k.quantity*k.price.deposit,0))??0,G=(p==null?void 0:p.reduce((s,k)=>s+k.quantity*k.price.remainder,0))??0,W=f==null?void 0:f.filter(s=>{var k;return((k=s.price)==null?void 0:k.price)!==0}),M=S&&b>0&&w<P?b:0,F=l.isSelected&&l.price.currency===j?l.price.price:0,E=P+B+O+F,z=c?c.price:0,$=E-z,N=E+C+G-z,x=e.jsxs(e.Fragment,{children:[e.jsx(i,{children:r("xo2:tooltipTitle")}),e.jsxs("ul",{style:{listStylePosition:"inside",marginLeft:8},children:[S&&e.jsx("li",{children:r("xo2:rentalCarPrice")}),S&&M>0&&e.jsx("li",{children:r("xo2:taxesAndFees")}),e.jsx("li",{children:r("xo2:platformFee")}),o==null?void 0:o.map(({title:s,id:k})=>e.jsx("li",{children:s},k))]})]});return e.jsxs(I,{bgcolor:"white",border:"1px solid #DBDDE2",borderRadius:3,py:2.5,px:{xs:1.5,desktop:2.5},children:[e.jsx(i,{fontWeight:600,color:"primary",textTransform:"capitalize",mb:1,onClick:t,children:r("xo2:priceBreakdown")}),e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,children:[e.jsx(i,{variant:"body2",children:r("xo2:rentalCarPrice")}),e.jsx(i,{variant:"body2",fontWeight:500,children:y.formatMoney(w,j)})]}),M>0&&e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,children:[e.jsx(i,{variant:"body2",children:r("xo2:taxesAndFees")}),e.jsx(i,{variant:"body2",fontWeight:500,children:y.formatMoney(M,j)})]}),o==null?void 0:o.map(s=>e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,children:[e.jsx(i,{variant:"body2",children:s.title}),e.jsx(i,{variant:"body2",fontWeight:500,children:y.formatMoney(s.price.price,s.price.currency)})]},s.id)),(g==null?void 0:g.winterTiresAvailable)&&e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,children:[e.jsx(i,{variant:"body2",children:r("xo2:winterTires")}),e.jsx(i,{variant:"body2",fontWeight:500,children:r("xo1:included")})]}),F>0&&e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,color:"primary.main",children:[e.jsx(i,{variant:"body2",children:"Carla Plus"}),e.jsx(i,{variant:"body2",fontWeight:500,children:y.formatMoney(F,j)})]}),W==null?void 0:W.map((s,k)=>{var Y,ee;return e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,children:[e.jsx(i,{variant:"body2",children:s.description}),e.jsx(i,{variant:"body2",fontWeight:500,children:s.included?r("xo1:included"):y.formatMoney((Y=s.price)==null?void 0:Y.price,(ee=s.price)==null?void 0:ee.currency)})]},k)}),p==null?void 0:p.map(s=>e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,display:s.quantity>0?"flex":"none",children:[e.jsxs(i,{variant:"body2",children:[s.name," ",s.quantity>1&&`(x${s.quantity})`]}),e.jsx(i,{variant:"body2",fontWeight:500,children:y.formatMoney((s.price.deposit+s.price.remainder)*s.quantity,s.price.currency)})]},s.type)),c&&e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,color:"primary.main",children:[e.jsxs(i,{display:"flex",alignItems:"center",variant:"body2",gap:.5,children:[e.jsx("img",{width:20,height:20,src:"/icons/carla-cash.svg",alt:"promo icon"}),r("xo2:carlaCashApplied")]}),e.jsx(i,{variant:"body2",fontWeight:500,children:`- ${y.formatMoney(z,c.currency)}`})]}),L&&e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,color:"primary.main",children:[e.jsxs(i,{display:"flex",alignItems:"center",variant:"body2",gap:.5,children:[e.jsx("img",{width:20,height:20,src:"/icons/promo.svg",alt:"promo icon"}),r("xo2:promoApplied")]}),e.jsx(i,{variant:"body2",fontWeight:500,children:`- ${y.formatMoney(v-m,j)}`})]}),e.jsx(De,{sx:{my:1.5}}),e.jsxs(u,{direction:"row",justifyContent:"space-between",color:"#006CF0",children:[e.jsxs(i,{fontWeight:600,display:"flex",alignItems:"center",gap:.5,children:[r("xo2:payNow"),e.jsx(le,{title:x,children:e.jsx(Re,{color:"primary",fontSize:"small"})})]}),e.jsx(i,{fontWeight:600,children:y.formatMoney($,j)})]}),e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1,children:[e.jsx(i,{fontWeight:500,children:r("xo2:payAtPickup")}),e.jsx(i,{fontWeight:600,children:y.formatMoney(C+G,j)})]}),e.jsxs(u,{direction:"row",justifyContent:"space-between",mt:1.5,children:[e.jsx(i,{fontWeight:500,fontSize:18,children:r("xo2:total")}),e.jsx(i,{fontWeight:600,fontSize:18,children:y.formatMoney(N,j)})]})]})}const it=Ie(e.jsx("path",{d:"M12 5.99 19.53 19H4.47zM12 2 1 21h22zm1 14h-2v2h2zm0-6h-2v4h2z"}),"ReportProblemOutlined");function re(){const{t}=T();return e.jsxs(We,{elevation:0,sx:{border:"1px solid #dfdfe7",borderRadius:"12px !important","&::before":{display:"none"},"&.Mui-expanded":{m:0},"& .MuiAccordionSummary-content":{m:0},background:"linear-gradient(180deg, #FFF 0%, #FAFAFA 100%)",boxShadow:"0px 2px 4px 0px rgba(0, 0, 0, 0.02)"},children:[e.jsx(Fe,{expandIcon:e.jsx(Pe,{}),sx:{px:{xs:1.5,desktop:2.5},"&.Mui-expanded":{minHeight:48},borderBottom:"1px solid #dfdfe7","& .MuiAccordionSummary-content.Mui-expanded":{m:0}},children:e.jsx(i,{fontWeight:500,children:t("confirmation:guide:summary")}
1)}),e.jsxs(ze,{sx:{"& ul":{margin:"0 0 0 20px"},bgcolor:"#FCFCFC",px:1.5,py:2},children:[e.jsxs(I,{border:"1px solid #dfdfe7",borderRadius:1.5,px:1.5,py:2,children:[e.jsxs(u,{useFlexGap:!0,direction:"row",alignItems:"center",gap:.5,mb:1,children:[e.jsx("img",{src:"/icons/license.svg",alt:"license",width:20,height:20}),e.jsx(i,{color:"#4A4B50",fontWeight:600,children:t("confirmation:guide:details:1:header")})]}),e.jsx(U,{i18nKey:"confirmation:guide:details:1:content",components:{ul:e.jsx("ul",{}),li:e.jsx("li",{})}})]}),e.jsxs(I,{border:"1px solid #dfdfe7",borderRadius:1.5,px:1.5,py:2,my:1.5,children:[e.jsxs(u,{useFlexGap:!0,direction:"row",alignItems:"center",gap:.5,mb:1,children:[e.jsx("img",{src:"/icons/deposit.svg",alt:"license",width:20,height:20}),e.jsx(i,{color:"#4A4B50",fontWeight:600,children:t("confirmation:guide:details:2:header")})]}),e.jsx(i,{children:e.jsx(U,{i18nKey:"confirmation:guide:details:2:content"})})]}),e.jsxs(I,{border:"1px solid #EB001B",bgcolor:"#FCEDEF",borderRadius:1.5,px:1.5,py:2,mb:1.5,children:[e.jsxs(u,{useFlexGap:!0,direction:"row",alignItems:"center",gap:.5,mb:1,children:[e.jsx(it,{sx:{fontSize:20}}),e.jsx(i,{color:"#4A4B50",fontWeight:600,children:t("confirmation:guide:details:3:header")})]}),e.jsx(U,{i18nKey:"confirmation:guide:details:3:content",components:{ul:e.jsx("ul",{}),li:e.jsx("li",{})}})]}),e.jsx(i,{textAlign:"center",color:"#4A4B50",fontWeight:600,children:t("confirmation:guide:details:subtitle")}),e.jsx(Le,{component:me,to:"/contact",textAlign:"center",color:"#0076FF",fontWeight:600,children:t("confirmation:guide:details:link")})]})]})}function rt({statusKey:t,email:r}){const{t:n}=T();return e.jsxs(h,{container:!0,direction:{xs:"column",desktop:"row"},alignItems:"center",spacing:{xs:1,desktop:2},children:[e.jsx("img",{src:"/icons/success.svg",alt:"success",height:64,width:64}),e.jsxs(h,{textAlign:{xs:"center",desktop:"start"},children:[e.jsx(i,{fontSize:18,fontWeight:600,color:"#4A4B50",children:n(`confirmation:header:${t}`)}),e.jsx(i,{fontSize:12,fontWeight:500,color:"#707278",children:n(`confirmation:title:${t}`,{email:r})})]})]})}function ne({imgSrc:t,title:r,subtitle:n,onClick:d}){return e.jsx(de,{onClick:d,disableRipple:!0,fullWidth:!0,sx:{textAlign:"start",textTransform:"none",justifyContent:"space-between",background:"linear-gradient(0deg, #FFF8F3 0%, #FFF 20%)",border:"1px solid #DBDDE2",borderRadius:2,p:{xs:1.5,desktop:2.5}},startIcon:e.jsx("img",{src:t,alt:"help",height:64,width:64}),endIcon:e.jsx(Be,{}),children:e.jsxs(i,{component:"span",fontSize:12,color:"#4A4B50",flex:1,children:[e.jsx("strong",{style:{fontSize:16},children:r}),e.jsx("br",{}),n]})})}function nt(){const{t}=T();return e.jsxs(h,{container:!0,spacing:1.5,alignItems:"center",bgcolor:"white",border:"1px solid #FF7D0E",borderRadius:3,p:1,children:[e.jsx("img",{src:"/images/carla-plus-success.png",alt:"carla-plus-success",height:64,width:64}),e.jsxs(h,{size:"grow",children:[e.jsx(i,{fontWeight:600,sx:{"& img":{verticalAlign:"text-top"}},children:e.jsx(U,{i18nKey:"confirmation:carlaPlus:header",components:{img:e.jsx("img",{src:"/icons/carla-plus-logo.svg",alt:"carla-plus-logo",height:20,width:"auto"})}})}),e.jsxs(Ee,{disablePadding:!0,children:[e.jsxs(_,{disableGutters:!0,disablePadding:!0,children:[e.jsx(K,{sx:{minWidth:"unset"}
1,children:e.jsx(H,{color:"primary",fontSize:"small"})}),e.jsx(Q,{disableTypography:!0,sx:{m:0,fontSize:12},children:t("confirmation:carlaPlus:item1")})]}),e.jsxs(_,{disableGutters:!0,disablePadding:!0,children:[e.jsx(K,{sx:{minWidth:"unset"},children:e.jsx(H,{color:"primary",fontSize:"small"})}),e.jsx(Q,{disableTypography:!0,sx:{m:0,fontSize:12},children:t("confirmation:carlaPlus:item2")})]}),e.jsxs(_,{disableGutters:!0,disablePadding:!0,children:[e.jsx(K,{sx:{minWidth:"unset"},children:e.jsx(H,{color:"primary",fontSize:"small"})}),e.jsx(Q,{disableTypography:!0,sx:{m:0,fontSize:12},children:t("confirmation:carlaPlus:item3")})]})]}),e.jsx(i,{fontSize:12,fontWeight:500,children:t("confirmation:carlaPlus:subtitle")})]})]})}const st=A.p` 2 margin: 0 -24px; 3 padding: 0 24px; 4 border-radius: 12px 12px 0 0; 5 line-height: 48px; 6 color: #f00; 7 font-size: 20px; 8 font-weight: 600; 9 background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 1)), 10 repeating-linear-gradient(135deg, #ffcad4 0px, #ffcad4 20px, white 20px, white 50px); 11`,ot=A.p` 12 color: var(--textBlack); 13 margin: 0 -24px; 14 padding: 0 24px; 15 font-size: 15px; 16 font-weight: 400; 17`,at=A.button` 18 @media screen and (max-width: 600px) { 19 width: 100%; 20 } 21 border-radius: 8px; 22 border: 0.75px solid #ed8508; 23 background: linear-gradient(180deg, #ff963d 0%, #ff7d0e 100%); 24 padding: 12px 32px; 25 text-align: center; 26 color: #fff; 27 font-weight: 600; 28 margin-top: 16px; 29`,ct=A.p` 30 margin: 0 -24px; 31 padding: 0 24px; 32 border-radius: 12px 12px 0 0; 33 line-height: 48px; 34 color: var(--colorSuccess); 35 font-size: 20px; 36 font-weight: 600; 37`,lt=A.p` 38 @media screen and (max-width: 600px) { 39 width: 100%; 40 } 41 display: flex; 42 padding: 12px 32px; 43 margin: 0; 44 margin-top: 16px; 45 justify-content: center; 46 align-items: center; 47 gap: 8px; 48 border-radius: 8px; 49 border: 1px solid #ff963d; 50 color: var(--Actions-Primary, #ff7d0e); 51 font-size: 14px; 52 font-weight: 600; 53 line-height: 16px; 54 width: fit-content; 55 &::before { 56 content: url('/icons/check-orange.svg'); 57 line-height: 0; 58 } 59`;function se({insurance:t,onClick:r,selectUpsell:n,purchasedUpsells:d,m:l="32px 24px 0"}){const{t:a}=T(),c=d.some(o=>o.type==="Insurance");if(!t&&!c)return null;function p(){n(t),r()}return e.jsxs(I,{p:"0 24px 16px",m:l,border:"1px solid var(--borderGrey)",borderRadius:3,bgcolor:"white",maxWidth:1232,children:[!c&&e.jsx(st,{children:a("success:upsell:notProtectedTitle")}),c&&e.jsx(ct,{children:a("success:upsell:protectedTitle")}),e.jsx(ot,{children:a(`success:upsell:${c?"protected":"notProtected"}`)}),!c&&e.jsx(at,{onClick:p,children:a("success:upsell:getProtection")}),c&&e.jsx(lt,{children:a("success:upsell:purchased")})]})}const dt=A.div` 60 padding: 20px 12px; 61 display: flex; 62 flex-direction: column; 63 gap: 16px; 64 background: white; 65 border: 1px solid var(--borderGrey); 66 border-radius: 12px; 67 & p { 68 margin: 0; 69 color: var(--textBlack); 70 font-weight: 400; 71 } 72 73 .ancillary-container { 74 display: flex; 75 gap: 16px; 76 flex-direction: ${({$direction:t})=>t||"column"}; 77 } 78 79 @media screen and (min-width: 1201px) { 80 padding: 20px; 81 } 82`,xe=A.div` 83 border: 1px solid var(--borderGrey); 84 border-radius: 4px; 85 padding: 12px; 86 font-size: 14px; 87 flex-grow: 1; 88 background: linear-gradient(180deg, #fff 0%, #fafafa 100%); 89 & p:nth-child(1) { 90 font-size: 16px; 91 font-weight: 600; 92 } 93 94 & p:nth-child(2) { 95 margin-bottom: 8px; 96 } 97`,pt=A.div` 98 & p:nth-child(1) { 99 color: var(--Actions-Primary, #ff7d0e); 100 font-size: 16px; 101 font-weight: 600; 102 margin-bottom: 12px; 103 } 104`,xt=A.button` 105 padding: 6px 32px; 106 border-radius: 8px; 107 border: 0.75px solid #ed8508; 108 background: linear-gradient(180deg, #ff963d 0%, #ff7d0e 100%); 109 text-align: center; 110 color: #fff; 111 font-size: 15px; 112 font-weight: 500; 113 line-height: 20px; 114 margin: 12px 0 0 auto; 115`,ut=A.p` 116 display: flex; 117 padding: 8px; 118 margin: 12px 0px 0px auto !important; 119 justify-content: center; 120 align-items: center; 121 gap: 8px; 122 border-radius: 8px; 123 border: 1px solid #ff963d; 124 color: var(--Actions-Primary, #ff7d0e) !important; 125 font-size: 14px; 126 font-weight: 600; 127 line-height: 16px; 128 width: fit-content; 129 &::before { 130 content: url('/icons/check.svg'); 131 line-height: 0; 132 } 133`;function oe({children:t,onClick:r,selectUpsell:n,purchasedUpsells:d,...l}){const{t:a}=T(),c=d.filter(o=>o.type!=="Insurance");
133if(t.length===0&&c.length===0)return null;function p(o){n(t[o]),r()}return e.jsxs(dt,{...l,children:[e.jsxs(pt,{children:[e.jsx("p",{children:a("success:upsell:header")}),e.jsx("p",{children:a("success:upsell:title")})]}),e.jsx("div",{className:"ancillary-container",children:t.map((o,f)=>{const g=d.some(m=>m.id===o.id);return e.jsxs(xe,{children:[e.jsx("p",{children:o.title}),e.jsx("p",{children:o.priceText}),e.jsx("p",{children:o.subtitle}),!g&&e.jsxs(xt,{onClick:()=>p(f),children:["+ ",a("success:upsell:add")]}),g&&e.jsx(ut,{children:a("success:upsell:purchased")})]})})})]})}const mt=A.div` 134 @media screen and (max-width: 600px) { 135 position: fixed !important; 136 margin: 0 !important; 137 width: 100%; 138 bottom: 0; 139 border-radius: 12px 12px 0 0; 140 } 141 142 min-width: min(100%, 600px); 143 display: flex; 144 flex-direction: column; 145 padding: 16px 24px 20px; 146 gap: 16px; 147 background: white; 148 border-radius: 12px; 149 150 & p { 151 margin: 0; 152 color: var(--textBlack); 153 } 154 155 > p { 156 color: #ff7d0e; 157 font-weight: 600; 158 line-height: 24px; 159 } 160 161 > button { 162 position: absolute; 163 right: 24px; 164 padding: 0; 165 border: none; 166 outline: none; 167 background: url('/icons/close-orange.svg') no-repeat center; 168 height: 24px; 169 width: 24px; 170 cursor: pointer; 171 } 172`;function ht({open:t,onClose:r,upsell:n,reservationId:d,setPurchasedUpsells:l}){const{t:a}=T(),[c,p]=Ae.useState(!1),o=he(v=>v.xo1Details),f=Ne(),g=fe();if(!n)return null;async function m(){p(!0);try{await V.upsellAncillaryProducts(d,n.id),g.removeQueries(["cancelAncillary",d]),l(w=>[...w,n]);const{ancillaryProducts:v,selectedAncillaries:C}=o,j={...o,ancillaryProducts:[...v,n],selectedAncillaries:[...C,n.id]};f(ge(j))}catch{}finally{p(!1),r()}}return e.jsxs(J,{PaperComponent:mt,open:t,onClose:r,children:[e.jsx("p",{children:a("success:upsell:confirm")}),e.jsx("button",{type:"button",onClick:r}),e.jsxs(xe,{children:[e.jsx("p",{children:n.title}),e.jsx("p",{children:n.priceText}),e.jsx("p",{children:n.subtitle})]}),e.jsxs(I,{children:[e.jsx(Oe,{onClick:m,children:c?e.jsx($e,{size:20,style:{color:"white"}}):`+ ${a("success:upsell:yesAdd")}`}),e.jsx(Ge,{onClick:r,children:a("xo2:upsell:skip")})]})]})}const ft=A(t=>e.jsx(qe,{...t}))` 173 &.MuiDialogContent-root { 174 padding: 24px 18px 18px 18px; 175 color: #75757f; 176 text-align: center; 177 font-size: 16px; 178 font-style: normal; 179 font-weight: 500; 180 line-height: normal; 181 p { 182 margin: 0 auto 24px auto; 183 max-width: 70%; 184 } 185 h4 { 186 color: #ff7d0e; 187 font-size: 20px; 188 font-weight: 700; 189 margin-bottom: 12px; 190 margin-top: 0; 191 } 192 .MuiFormGroup-root { 193 padding: 0 8px; 194 margin-bottom: 20px; 195 } 196 .MuiTypography-body1 { 197 color: #75757f; 198 font-size: 15px; 199 } 200 } 201`,gt=A("button")` 202 display: flex; 203 height: 44px; 204 padding: 10px 16px; 205 justify-content: center; 206 align-items: center; 207 gap: 10px; 208 align-self: stretch; 209 border-radius: 4px; 210 background: #ff7d0e; 211 width: 100%; 212 border: #ff7d0e 1px solid; 213 cursor: pointer; 214 215 color: #fff; 216 font-size: 18px; 217 font-style: normal; 218 font-weight: 600; 219 line-height: normal; 220 letter-spacing: 0.529px; 221`;function jt(){const t=ce(),{data:r,isLoading:n}=je(["success-survey"],()=>V.startSurvey(t),{keepPreviousData:!0,staleTime:1e3*300}),{mutate:d}=_e(["success-survey-submit"],l=>{var f,g;if(!r)return;const{type:a,id:c}=r,p=(g=(f=r.body)==null?void 0:f.choices)==null?void 0:g.filter(m=>m.id===l),o={questionId:c,answer:{type:a,choice:be(p[0],["type","id"])}};return V.startSurveySubmit(o,t)});return{data:r,isLoading:n,submitSurvey:d}}function ue(){var S;const{data:t,isLoading:r,submitSurvey:n}=jt(),[d,l]=D.useState(!0),[a,c]=D.useState(null),{t:p}=T(),o=pe(),{title:f,skippable:g,description:m,body:v,id:C="success-survey"}=t||{},j=b=>{var P;b.preventDefault(),c((P=b.target)==null?void 0:P.value)},w=()=>{l(!1),o(ye(!1))},L=b=>{b.preventDefault(),n(a,{onError:P=>{},onSettled:()=>w()})};return e.jsx(J,{maxWidth:"sm",fullWidth:!0,onClose:w,"aria-labelledby":"success-survey-dialog",open:d&&!r,disableBackdropClick:g,children:e.jsxs(ft,{children:[e.jsx("h4",{children:f}),e.jsx("p",{children:m}),e.jsx(Ke,{"aria-label":"abc",name:C,children:(S=v==null?void 0:v.choices)==null?void 0:S.map(b=>e.jsx(Qe,{value:b.id,control:e.jsx(He,{}),label:b.title,onChange:j},b.id))}),e.jsx(gt,{type:"button",onClick:L,children:p("success:submit")})]})})}ue.propTypes={};const ae="https://reviewcollection.trustpilot.com/verifiedreviewcollector/main.js",X=({data:t})=>{const n=Z(a=>a.breakpoints.down("desktop"))?"S":"M",d=D.useRef(null),l=ce();return D.useEffect(()=>{t&&(async()=>
221{if(!document.querySelector(`script[src="${ae}"]`)){const c=document.createElement("script");c.src=ae,c.async=!0,document.head.appendChild(c)}await customElements.whenDefined("trustbox-verified-review-collector"),d.current&&(d.current.onReady=async()=>{var c;(c=d.current)==null||c.dispatchEvent(new CustomEvent("customerDataResponse",{detail:t}))})})()},[t]),e.jsx("trustbox-verified-review-collector",{ref:d,class:"trustpilot-widget",id:"tp-verified-widget","style-size":n,locale:l,"template-id":"53ch7c1d9be8a02f64d31e79","businessunit-id":"64934c98cf1671b1189168b7","style-width":"100%","border-type":"noBorder",background:"light","has-animated-stars":"true"})},bt=D.forwardRef(function(r,n){return e.jsx(Ze,{direction:"up",ref:n,...r})});function yt({open:t,onClose:r,children:n}){const{t:d}=T(),l=Z(a=>a.breakpoints.down("desktop"));return e.jsxs(J,{slots:{transition:l?bt:void 0},open:t,fullWidth:!0,sx:{"& .MuiPaper-root":{position:"relative",m:0,width:l?"100%":480,borderRadius:l?"12px 12px 0 0":3,p:2,pb:l?4:2,bgcolor:"white"},"& .MuiDialog-container":{alignItems:l?"end":"center"},"& tp-widget-verified-review-collector":{p:0}},children:[e.jsx(Ve,{size:"small",onClick:r,sx:a=>({position:"absolute",border:`1px solid ${a.palette.grey[200]}`,p:"6px",top:14,right:16,color:a.palette.grey[600],bgcolor:a.palette.grey[100],fontSize:16}),children:e.jsx(Xe,{fontSize:"inherit"})}),e.jsx(i,{color:"primary",sx:{fontSize:18,fontWeight:600,textAlign:"center",lineHeight:"24px",mb:.5},children:d("confirmation:tpHeader")}),n,e.jsx(i,{color:"text.secondary",sx:{fontWeight:500,textAlign:"center"},children:d(l?"confirmation:tpMobile":"confirmation:tpDesktop")})]})}function Hi(){var N;const{t}=T(),r=pe(),{showSurvey:n}=R(x=>x.user),d=Ue(),l=Je(),a=Z(l.breakpoints.down("tablet")),c=R(x=>x.reservationResponse),{reservationId:p,reservation:o,successSell:f=[],confirmationNo:g,reviewInvitation:m}=c||{},v=R(x=>x.carRentalProduct),C=R(x=>x.xo1Details),[j,w]=D.useState(!1),[L,S]=D.useState(null),[b,P]=D.useState([]),B=!!(c!=null&&c.tpDialogVisible);if(!c||!o)return e.jsx(we,{to:"/"});const O=o.status!=="DONE",G=O?"manual":"done",{product:W,ancillaryProducts:M=[],selectedAncillaries:F=[]}=C||{};(N=W==null?void 0:W.price)!=null&&N.discountedTotal&&r(ve(null));const E=M.filter(x=>F.includes(x.id)).some(x=>x.type==="Insurance"),z=f.filter(x=>x.type==="Insurance"&&!F.includes(x.id)),$=f.filter(x=>x.type!=="Insurance"&&!F.includes(x.id)),q=x=>{d.push(x)};return e.jsxs(e.Fragment,{children:[e.jsx(Ye,{disableGutters:!0,maxWidth:"desktop",children:e.jsxs(h,{container:!0,mx:{xs:1,phone:2,tablet:4},spacing:3,mb:7,children:[e.jsx(h,{size:12,mt:7,children:e.jsxs(u,{useFlexGap:!0,spacing:7,children:[e.jsx(rt,{statusKey:G,email:o.userInfo.email}),o.carlaPlusDetails&&e.jsx(nt,{})]})}),e.jsx(h,{size:{xs:12,tablet:6},children:e.jsxs(u,{useFlexGap:!0,spacing:3,children:[e.jsxs(u,{useFlexGap:!0,spacing:1,children:[e.jsx(tt,{carRentalProduct:v,isOnRequest:O}),e.jsx(te,{header:t("reservations:verification:voucher"),id:p,title:t("confirmation:id:voucherTitle"),snackbarText:t("confirmation:snackbarText")}),e.jsx(te,{header:t("success:confirmNo"),id:g,title:t("confirmation:id:confirmTitle"),snackbarText:t("confirmation:snackbarText")})]}),a&&e.jsxs(e.Fragment,{children:[!E&&e.jsx(se,{insurance:z[0],onClick:()=>w(!0),selectUpsell:S,purchasedUpsells:b,m:0}),e.jsx(ie,{}),m&&e.jsxs(I,{sx:x=>({border:`1px solid ${x.palette.grey[200]}`,borderRadius:3,bgcolor:"white",p:"0 12px 20px 12px"}),children:[e.jsx(X,{data:m}),e.jsx(i,{color:"text.secondary",fontWeight:500,textAlign:"center",children:t("confirmation:tpMobile")})]}),e.jsx(re,{})]}),e.jsxs(u,{useFlexGap:!0,spacing:1,children:[e.jsx(ne,{imgSrc:"/images/help.png",title:t("confirmation:pageLink:1:title"),subtitle:t("confirmation:pageLink:1:subtitle"),onClick:()=>q("/contact")}),e.jsx(ne,{imgSrc:"/images/garage.png",title:t("confirmation:pageLink:2:title"),subtitle:t("confirmation:pageLink:2:subtitle"),onClick:()=>q("/my-reservations")})]}),a&&e.jsx(oe,{onClick:()=>w(!0),selectUpsell:S,purchasedUpsells:b,children:$})]})}),e.jsx(h,{size:{xs:12,tablet:6},children:e.jsxs(u,{useFlexGap:!0,spacing:3,children:[!a&&e.jsxs(e.Fragment,{children:[E&&e.jsx(se,{insurance:z[0],onClick:()=>w(!0),selectUpsell:S,purchasedUpsells:b,m:0}),e.jsx(re,{}),e.jsx(ie,{}),m&&e.jsxs(I,{sx:x=>({border:`1px solid ${x.palette.grey[200]}`,borderRadius:3,bgcolor:"white",p:"0 12px 20px 12px"}),children:[e.jsx(X,{data:m}),e.jsx(i,{color:"text.secondary",fontWeight:500,textAlign:"center",children:t("confirmation:tpDesktop")})]}),e.jsx(oe,{onClick:()=>w(!0),selectUpsell:S,purchasedUpsells:b,children:$})]}),e.jsx(Me,{})]})})]})}),e.jsx(ht,{open:j,onClose:()=>w(!1),upsell:L,reservationId:p,setPurchasedUpsells:P}),n&&!B&&e.jsx(ue,{}),B&&m&&e.jsx(yt,{open:B,onClose:()=>{r(ke())},children:e.jsx(X,{data:m})})]})}export{Hi as default}; 222//# sourceMappingURL=index-CCYwpBzB.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.