PageSourceSearch

https://hellobus.nl/assets/ConfirmedScreen-DnNug-xq.js

js hellobus.nl collected 2026-10-08 18:44:00 UTC 7,597 bytes, 2 lines download raw bytes

1import{S as te,u as ne,_ as c,c as ae,o as ie,r as h,U as oe,j as e,P as re,aB as ce,C as w,M as f,T as D,i as le,B as N,n as I,a7 as de,L as me}from"./index-W61GlO1C.js";import{b as ue,f as be,a as fe,d as xe}from"./BookingLayout-CiGxiUzW.js";import{I as P}from"./ItineraryCard-Doa8k7gd.js";import{m as pe}from"./multiLegItinerary-_NOmOZGG.js";import{a as he}from"./PaymentAmountModal-CcQe9H87.js";import{u as ge}from"./useCreateMolliePaymentMutation-B_aTLKKE.js";import"./BusIcon-dlYUETRY.js";import"./formatDate-pKFIxZjg.js";import"./format-R3o4lqiB.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"2026-10.11"};var r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="e754d873-ddc1-465f-a9a3-4996791cca0d",s._sentryDebugIdIdentifier="sentry-dbid-e754d873-ddc1-465f-a9a3-4996791cca0d")}catch{}})();const je=["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],ve=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ee({type:s="booking"}){const r=te(),{t:n,i18n:E}=ne("booking"),i=c(t=>t.trip),a=c(t=>t.booking),l=c(t=>t.quote),x=c(t=>t.multiLegQuote),m=c(t=>t.savedTrip),B=c(t=>t.customer),u=c(t=>t.busClass),O=c(t=>t.busTypeCode),U=c(t=>t.busSelection),A=c(t=>t.multiSelectActive),o=c(t=>t.priceLookup),F=c(t=>t.priceScreenTotal),R=c(t=>t.existingBooking),d=ae(),y=ie(),[g]=h.useState(()=>{var t;return((t=y.state)==null?void 0:t.paymentFailed)===!0}),[$,k]=h.useState(g),j=ge(),L=ue(s==="saved"?r.savedTripUuid:void 0,{awaitBookingCheck:!0}),H=s!=="saved"||(o==null?void 0:o.trip_uuid)===r.savedTripUuid;h.useEffect(()=>{g&&d(y.pathname,{replace:!0,state:null})},[]),h.useEffect(()=>{if(s==="booking"&&(!a||!a.price)){d("/account",{replace:!0});return}if(s==="quote"&&!l){d("/account",{replace:!0});return}s==="saved"&&!m&&!r.savedTripUuid&&d("/account",{replace:!0})},[s,a,l,m,r.savedTripUuid,d]);const S=s==="booking"?r.bookingUuid:s==="saved"?r.savedTripUuid:r.tripUuid,p=S??(a==null?void 0:a.booking_reference)??(l==null?void 0:l.quote_reference)??(m==null?void 0:m.savedTripUuid)??"",q=(s==="booking"?a==null?void 0:a.booking_reference:s==="quote"?l==null?void 0:l.quote_reference:void 0)||(s==="saved"?p.slice(0,8):p),v=o==null?void 0:o.available_bus_types.find(t=>t.code===O),z=B.email||n("confirmed.fallbackEmail"),J=E.language.startsWith("en")?ve:je,Q=u==="budget"||u==="comfort"||u==="premium"?n(`classRow.classes.${u}.name`):u,W=A?oe(U,(o==null?void 0:o.available_bus_types)??[],""):(v==null?void 0:v.name)??n("price.defaultBusName"),K=(a==null?void 0:a.booking_uuid)??S??"",X=s==="saved"&&!!p&&!R&&L==="ready",Y=t=>{j.mutate({bookingUuid:K,percentage:t},{onSuccess:({checkoutUrl:b})=>{window.location.href=b}})},T=s==="saved",G=T?1:4,C=(t,b)=>(t??[]).map((ee,se)=>({address:ee,waitMinutes:(b==null?void 0:b[se])??null})),V=i?[{key:"outbound",isInbound:!1,from:i.origin.description,to:i.destination.description,stops:C(i.stops,i.stop_wait_minutes),departureDate:i.departure_date,arrivalDate:(o==null?void 0:o.outbound_arrival_date)??null},...i.trip_mode==="round-trip"&&i.return_date?[{key:"return",isInbound:!0,from:i.destination.description,to:i.origin.description,stops:C(i.return_stops,i.return_stop_wait_minutes),departureDate:i.return_date,arrivalDate:(o==null?void 0:o.inbound_arrival_date)??null}]:[]]:[],M=s==="booking"?(a==null?void 0:a.price)??null:s==="saved"?F??(o==null?void 0:o.price)??null:null,Z=be(s==="quote"&&!i?x:null);return e.jsxs(fe,{stage:G,lockStepper:T,children:[e.jsx(re,{title:n(`confirmed.meta.${s}.title`),description:n(`confirmed.meta.${s}.description`),metaRobots:"NOINDEX,FOLLOW"}),e.jsxs("main",{className:"max-w-[880px] mx-auto px-4 md:px-14 mt-7 md:mt-12 pb-[88px] md:pb-20",children:[g?e.jsxs("div",{role:"alert",className:"mb-8 flex items-start gap-3 rounded-2xl border border-hb-error/40 bg-hb-error/5 p-4 md:p-5",children:[e.jsx("span",{className:"mt-0.5 shrink-0 text-hb-error",children:e.jsx(ce,{size:20})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-body font-semibold text-hb-ink",children:n("confirmed.paymentFailed.title")}),e.jsx("p",{className:"mt-1 font-body text-hb-body leading-[1.5] text-hb-ink-soft",children:n("confirmed.paymentFailed.body")})]})]}):null,e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("span",{className:"inline-grid place-items-center w-[72px] h-[72px] rounded-full bg-hb-success text-white mb-6",children:e.jsx(w,{size:36})}),e.jsx(f,{children:n(`confirmed.ref.${s}`,{ref:q})}),e.jsx("h1",{className:"font-display font-semibold text-hb-h1 mt-3 mb-6",children:e.jsx(D,{i18nKey:`confirmed.heading.${s}`,ns:"booking",components:{accent:e.jsx(le,{})}})}),e.jsx("p",{className:"font-body text-hb-body-lg text-hb-ink-soft max-w-[540px] m-0",children:e.jsx(D,{i18nKey:`confirmed.intro.${s}`,ns:"booking",values:{email:z},components:{strong:e.jsx("strong",{className:"text-hb-ink font-medium"})}})}),e.jsxs("div",{className:"mt-8 flex flex-wrap gap-3 justify-center",children:[s==="booking"&&e.jsxs(N,{onClick:()=>k(!0),children:[n("confirmed.payBooking")," ",e.jsx(I,{size:16})]}),X&&e.jsxs(N,{onClick:()=>d(`/trip/${p}`),children:[e.jsx(w,{size:15})," ",n("confirmed.finishBooking")]}),e.jsx(N,{variant:"ghost",onClick:()=>d("/account"),children:n("confirmed.goToDashboard")})]}),j.isError&&e.jsx("p",{className:"mt-3 text-hb-body-sm text-hb-error",children:n("error.payment")})]}),s==="quote"&&!i&&x?e.jsxs("section",{className:"mt-9 md:mt-14",children:[e.jsx(f,{className:"block mb-4",children:n("confirmed.trip")}),e.jsx(P,{legs:pe(x,Z),isMultiLeg:!0,passengers:x.numberOfPassengers,busLabel:n("quote.bus")})]}):null,i&&H?e.jsxs("section",{className:"mt-9 md:mt-14",children:[e.jsx(f,{className:"block mb-4",children:n("confirmed.trip")}),e.jsx(P,{legs:V,passengers:i.numberOfPassengers,busLabel:W,classLabel:Q||void 0,priceLabel:M!=null?de(M,{showCents:!0}):void 0})]}
1):null,s==="booking"?e.jsxs("section",{className:"mt-7",children:[e.jsx(f,{className:"block mb-4",children:n("confirmed.next")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2.5 md:gap-3.5",children:[e.jsx(_,{n:"01",title:n("confirmed.step1.title"),body:n("confirmed.step1.body")}),e.jsx(_,{n:"02",title:a?n("confirmed.step2.titleWithDate",{date:Ne(a.payment_due_date,J)}):n("confirmed.step2.titleFallback"),body:n("confirmed.step2.body")}),e.jsx(_,{n:"03",title:n("confirmed.step3.title"),body:n("confirmed.step3.body")})]})]}):null,e.jsx("div",{className:"mt-10 text-center",children:e.jsxs(me,{to:"/",className:"font-body text-hb-body-sm text-hb-primary inline-flex items-center gap-1",children:[n("confirmed.backToHome")," ",e.jsx(I,{size:12})]})}),e.jsx(he,{isOpen:$,onClose:()=>k(!1),totalAmount:(a==null?void 0:a.price)??0,bookingPaymentStatus:null,onConfirm:Y,isSubmitting:j.isPending,hideHalfOption:(a==null?void 0:a.bus_class)==="budget"})]}),a&&i?e.jsx(xe,{variant:"bottom-bar",visible:!0,total:a.price,pax:i.numberOfPassengers}):null]})}function _({n:s,title:r,body:n}){return e.jsxs("div",{className:"bg-hb-bg-card border border-hb-line rounded-2xl p-[22px] flex flex-col gap-2",children:[e.jsx(f,{children:s}),e.jsx("h3",{className:"font-display font-semibold text-hb-h4 m-0",children:r}),e.jsx("p",{className:"font-body text-hb-body-sm text-hb-ink-soft m-0",children:n})]})}function Ne(s,r){if(!s)return"";const n=s.split("-");return n.length!==3?s:`${Number(n[2])} ${r[Number(n[1])-1]??""}`}export{Ee as ConfirmedScreen};
2//# sourceMappingURL=ConfirmedScreen-DnNug-xq.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.