1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3078],{1140:(e,t,n)=>{"use strict";n.d(t,{N:()=>c,u:()=>o});var i=n(9678),a=n(8001),s=n(483),r=n(126),l=n(4980);function o(e,t){if(!(0,a.XW)("analytics"))return;let n=(0,s.Y3)(),o=(0,s.c6)();if(!n&&!o)return;let c=window.location.pathname+(window.location.search||""),d={...(0,r.GP)(),...function(e){if(!e)return;let t={};for(let[n,i]of Object.entries(e))null!=i&&""!==i&&(t[n]=i);return Object.keys(t).length?t:void 0}(t)},m=function(e,t,n,i){let a=(null==i?void 0:i.bookingId)?String(i.bookingId):"";return e===l.X.BookingConfirmed&&a?"booking:".concat(a,":confirmed"):e===l.X.PaymentStarted&&t?"".concat(t,":PaymentStarted"):e===l.X.PaymentSubmitted&&t?"".concat(t,":PaymentSubmitted"):e===l.X.BookingAbandoned&&t?"".concat(t,":BookingAbandoned"):"".concat(t||n||"anon",":").concat(e,":").concat((0,s.WR)())}(e,o,n,t),h={visitorId:n,sessionId:o,distinctId:(0,s.qC)()||n,events:[{name:e,path:c,title:document.title||"",referrer:document.referrer||"",insertId:m,properties:{...d,insert_id:m},ts:new Date().toISOString()}]};e===l.X.SearchStarted&&(0,a.XW)("personalization")&&(0,s.yq)({origin:(null==t?void 0:t.origin)?String(t.origin):void 0,destination:(null==t?void 0:t.destination)?String(t.destination):void 0,cabin:(null==t?void 0:t.cabin)?String(t.cabin):void 0,tripType:(null==t?void 0:t.tripType)?String(t.tripType):void 0});let p="".concat((0,i.Gi)(),"/api/site/events"),f=JSON.stringify(h);try{if("undefined"!=typeof navigator&&navigator.sendBeacon&&e===l.X.SessionExit){let e=new Blob([f],{type:"application/json"});navigator.sendBeacon(p,e);return}}catch(e){}fetch(p,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:f,keepalive:!0}).catch(()=>void 0)}function c(){return{visitorId:(0,s.Y3)()||void 0,sessionId:(0,s.c6)()||void 0}}},2410:(e,t,n)=>{Promise.resolve().then(n.bind(n,2797))},2797:(e,t,n)=>{"use strict";n.d(t,{SearchingClient:()=>u});var i=n(5155),a=n(2619),s=n.n(a),r=n(63),l=n(2115),o=n(6849),c=n(9678),d=n(6168),m=n(9268),h=n(7315),p=n(1140),f=n(4980);function u(e){let{qs:t}=e,n=(0,r.useRouter)(),[a,u]=(0,l.useState)(null),[g,x]=(0,l.useState)("Contacting airlinesâ¦"),[y,b]=(0,l.useState)(0);return(0,l.useEffect)(()=>{let e=new URLSearchParams(t),i=!1;return async function(){try{u(null),x("Searching live faresâ¦");let a=(e.get("trip")||"").toUpperCase();if("MULTI"===a&&(0,m.yR)(e).length<2)return void u("This multi-city link needs at least two complete flights.");let s={...(0,d.jK)(e,(0,h.OY)()),...(0,p.N)()};(0,p.u)(f.X.SearchStarted,{origin:s.from,destination:s.to,tripType:s.tripType,cabin:s.cabin});let r=await (0,c.$P)("/api/flights/search/start",s);if(i)return;let l=r.searchId||"";if(!l){(0,p.u)(f.X.SearchFailed,{origin:s.from,destination:s.to}),u(r.message||r.error||"Search did not return a session. Try again.");return}(0,p.u)(f.X.SearchCompleted,{origin:s.from,destination:s.to,searchId:l,offers:Number(r.count||0)}),x("Opening resultsâ¦"),n.replace((0,d.sR)(t,l))}catch(e){i||u(e instanceof Error?e.message:"Search failed. Check your connection and try again.")}}(),()=>{i=!0}},[y,t,n]),(0,i.jsx)("div",{className:"bg-[var(--background)] pb-16",children:(0,i.jsxs)("div",{className:"fm-container py-8",children:[(0,i.jsx)(o.C,{current:"results"}),(0,i.jsxs)("div",{className:"flex min-h-[40vh] flex-col items-center justify-center py-10 text-center",children:[!a&&(0,i.jsx)("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-sky-200 border-t-sky-600"}),(0,i.jsx)("h1",{className:"mt-6 font-[family-name:var(--font-fraunces)] text-3xl text-slate-900",children:a?"Couldnât search flights":"Searching fares"}),(0,i.jsx)("p",{className:"mt-2 max-w-md text-slate-600",children:a||g}),a?(0,i.jsxs)("div",{className:"mt-8 flex flex-wrap justify-center gap-3",children:[(0,i.jsx)("button",{type:"button",className:"fm-btn-primary",onClick:()=>{x("Retrying searchâ¦"),b(e=>e+1)},children:"Try again"}),(0,i.jsx)(s(),{href:"/?".concat(t,"#search"),className:"fm-btn-ghost",children:"Edit search"})]}):(0,i.jsxs)("ol",{className:"mt-8 max-w-sm space-y-2 text-left text-sm text-slate-600",children:[(0,i.jsx)("li",{children:"1. Shop live inventory"}),(0,i.jsx)("li",{children:"2. Confirm itinerary and fare"}),(0,i.jsx)("li",{children:"3. Price, book, then pay"})]})]})]})})}},4980:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});let i={PageView:"PageView",SessionStart:"SessionStart",SessionExit:"SessionExit",ReturningVisit:"ReturningVisit",SearchStarted:"SearchStarted",SearchCompleted:"SearchCompleted",SearchFailed:"SearchFailed",OfferSelected:"OfferSelected",FareSelected:"FareSelected",ReviewViewed:"ReviewViewed",PassengersStarted:"PassengersStarted",PassengersCompleted:"PassengersCompleted",PaymentStarted:"PaymentStarted",PaymentSubmitted:"PaymentSubmitted",PaymentFailed:"PaymentFailed",BookingConfirmed:"BookingConfirmed",BookingAbandoned:"BookingAbandoned",FilterApplied:"FilterApplied",CtaClicked:"CtaClicked",CouponApplied:"CouponApplied",ConsentUpdated:"ConsentUpdated"}}
1,6849:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var i=n(5155),a=n(2619),s=n.n(a);let r=[{id:"flights",short:"Flights",label:"Flights",match:["results","review"]},{id:"fare",short:"Fare",label:"Fare",match:["fare"]},{id:"passengers",short:"Pax",label:"Passengers",match:["passengers"]},{id:"payment",short:"Pay",label:"Payment",match:["payment"]},{id:"confirm",short:"Done",label:"Complete",match:["confirm"]}];function l(e){let{current:t}=e,n=r.findIndex(e=>e.match.includes(t));return(0,i.jsxs)("div",{className:"mb-6 md:mb-8",children:[(0,i.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-2 sm:hidden",children:[(0,i.jsxs)("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-400",children:["Step ",Math.max(n+1,1)," of ",r.length]}),(0,i.jsx)(s(),{href:"/flight",className:"text-sm font-semibold text-[var(--fm-sky-deep)]",children:"Modify search"})]}),(0,i.jsxs)("ol",{className:"flex items-center gap-1 overflow-x-auto pb-1 sm:flex-wrap sm:gap-2 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[r.map((e,t)=>{let a=t<n;return(0,i.jsxs)("li",{className:"flex shrink-0 items-center gap-1 sm:gap-2",children:[(0,i.jsxs)("span",{className:"inline-flex h-9 items-center gap-1.5 rounded-full px-2.5 text-xs font-bold transition sm:px-3.5 ".concat(t===n?"bg-[var(--fm-ink)] text-white":a?"bg-sky-100 text-sky-900":"bg-slate-100 text-slate-500"),children:[a?(0,i.jsx)("span",{"aria-hidden":!0,children:"â"}):(0,i.jsx)("span",{className:"opacity-70",children:t+1}),(0,i.jsx)("span",{className:"sm:hidden",children:e.short}),(0,i.jsx)("span",{className:"hidden sm:inline",children:e.label})]}),t<r.length-1&&(0,i.jsx)("span",{className:"hidden text-slate-300 sm:inline","aria-hidden":!0,children:"â"})]},e.id)}),(0,i.jsx)("li",{className:"ml-auto hidden text-sm sm:block",children:(0,i.jsx)(s(),{href:"/flight",className:"font-semibold text-[var(--fm-sky-deep)] hover:underline",children:"Modify search"})})]})]})}}},e=>{e.O(0,[2619,4030,2814,6168,8441,1255,7358],()=>e(e.s=2410)),_N_E=e.O()}]);
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.