PageSourceSearch

https://www.militaryfares.com/_next/static/chunks/3_f08tchhkulb.js

js militaryfares.com collected 2026-10-06 05:40:42 UTC 77,661 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15505,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-left-right",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);e.s(["ArrowLeftRight",0,t],15505)},99602,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);e.s(["ArrowUpDown",0,t],99602)},58500,e=>{"use strict";let t=(0,e.i(75254).default)("bed-double",[["path",{d:"M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8",key:"1k78r4"}],["path",{d:"M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4",key:"fb3tl2"}],["path",{d:"M12 4v6",key:"1dcgq2"}],["path",{d:"M2 18h20",key:"ajqnye"}]]);e.s(["BedDouble",0,t],58500)},7486,e=>{"use strict";let t=(0,e.i(75254).default)("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);e.s(["Building2",0,t],7486)},61277,e=>{"use strict";let t=(0,e.i(75254).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["default",0,t])},12012,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["default",0,t])},73375,e=>{"use strict";var t=e.i(12012);e.s(["ChevronLeft",()=>t.default])},46349,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},63059,e=>{"use strict";var t=e.i(46349);e.s(["ChevronRight",()=>t.default])},3116,e=>{"use strict";let t=(0,e.i(75254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,t],3116)},48256,e=>{"use strict";let t=(0,e.i(75254).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",0,t],48256)},46897,e=>{"use strict";let t=(0,e.i(75254).default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);e.s(["MapPin",0,t],46897)},99023,e=>{"use strict";let t=(0,e.i(75254).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["Minus",0,t],99023)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],7233)},55436,e=>{"use strict";let t=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],55436)},51975,e=>{"use strict";let t=(0,e.i(75254).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",0,t],51975)},61911,e=>{"use strict";let t=(0,e.i(75254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["Users",0,t],61911)},2342,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(48148),n=e.i(95727),s=e.i(18566),l=e.i(58639),i=e.i(52077),o=e.i(90064),c=e.i(31254),d=e.i(74589),u=e.i(10688),m=e.i(44365),h=e.i(46897),p=e.i(48256),x=e.i(51975),f=e.i(56545),v=e.i(89979),g=e.i(85176),b=e.i(27166),y=e.i(37727),j=e.i(63059),N=e.i(73375);
1function k({value:e,onChange:n,onSelect:s,placeholder:l,label:i,icon:c=h.MapPin,error:d,nationality:u="US",onDebugUrl:m}){let p=(0,o.useDebug)(),x=(0,r.useTranslations)(),f="US"===u,[w,E]=(0,a.useState)((0,b.titleCaseIfCaps)(e?.name||"")),[S,C]=(0,a.useState)([]),[D,T]=(0,a.useState)([]),[M,_]=(0,a.useState)("idle"),[A,R]=(0,a.useState)(!1),[O,U]=(0,a.useState)(null),P=(0,v.useDebounce)(w,g.AUTOCOMPLETE_DEBOUNCE_MS),L=(0,a.useRef)(null),F=(0,a.useRef)(!1),I=(0,a.useRef)(!1);function z(){E(""),n(null),C([]),T([]),_("idle"),U(null)}return(0,a.useEffect)(()=>{function t(t){L.current&&!L.current.contains(t.target)&&(I.current=!1,E((0,b.titleCaseIfCaps)(e?.name||"")),T([]),U(null),_("idle"))}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[M,e]),(0,a.useEffect)(()=>{if(F.current){F.current=!1;return}if(!I.current)return;if(P.length<g.AUTOCOMPLETE_MIN_CHARS){C([]),_("idle");return}let e=!1;return R(!0),fetch(`/api/cars?method=location&q=${encodeURIComponent(P)}&is_usa=${f?"1":"0"}`).then(e=>e.json()).then(t=>{e||(R(!1),p&&t._debug_api_url&&m?.({label:"City search",url:t._debug_api_url}),"cities"===t.type&&t.items?.length>0?(C(t.items),_("cities")):"stations"===t.type&&t.items?.length>0?(T(t.items),_("stations")):(C([]),_("idle")))}).catch(()=>{e||R(!1)}),()=>{e=!0}},[P]),(0,a.useEffect)(()=>{e?.name&&e.name!==w&&E((0,b.titleCaseIfCaps)(e.name))},[e]),(0,t.jsxs)("div",{className:"relative",ref:L,children:[(0,t.jsxs)("div",{className:`form-input relative overflow-hidden rounded-md px-3 pe-4 pt-1.5 pb-2 ${d?"border-red-500":""}`,children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(c,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[i&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:i}),(0,t.jsx)("input",{type:"text",className:"block h-5 w-full bg-transparent text-sm leading-5 outline-none placeholder:text-[var(--brand-text-muted)]",placeholder:l,value:w,onChange:e=>{I.current=!0,E(e.target.value),e.target.value||z()},onFocus:()=>{I.current=!0,w&&"idle"===M&&E("")},autoComplete:"off"})]})]}),w&&!A&&(0,t.jsx)("button",{type:"button",onClick:z,className:"absolute end-2 top-1/2 -translate-y-1/2 rounded-full p-0.5 text-[var(--brand-text-muted)] hover:text-[var(--brand-text)]",children:(0,t.jsx)(y.X,{className:"h-4 w-4"})}),A&&(0,t.jsx)("div",{className:"absolute end-2 top-1/2 -translate-y-1/2",children:(0,t.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--brand-surface)] border-t-[var(--brand-primary)]"})})]}),("cities"===M||"stations"===M||"loading_stations"===M)&&(0,t.jsxs)("ul",{className:"autocomplete-dropdown absolute left-0 top-full z-50 mt-1 max-h-72 w-full overflow-y-auto rounded-lg",children:["cities"===M&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"sticky top-0 z-10 border-b border-blue-200 bg-blue-50 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-blue-700",children:x("SELECT_CITY")}),S.map((e,a)=>(0,t.jsxs)("li",{className:"flex cursor-pointer items-center justify-between border-b border-blue-50 bg-blue-50/40 px-3 py-2 text-sm text-[var(--brand-text)] transition-colors hover:bg-blue-100/60",onClick:()=>{let t;return U(e),_("loading_stations"),R(!0),t=f?`${e.country};${e.city};${e.code}`:`${e.country};${e.city};;${e.lat};${e.lon}`,void fetch(`/api/cars?method=location&q=${encodeURIComponent(t)}&is_usa=${f?"1":"0"}&expect=stations`).then(e=>e.json()).then(t=>{if(R(!1),p&&t._debug_api_url&&m?.({label:"Station search",url:t._debug_api_url}),"stations"===t.type&&t.items?.length>0)T(t.items),_("stations");else if(t.items?.length===0){let t=e.code||"";F.current=!0,E(`${e.city} (${e.country})`);let a={station:t,code:t,name:`${e.city} (${e.country})`,city:e.city};n(a),_("idle"),s&&s(a)}}).catch(()=>{R(!1),_("idle")})},children:[(0,t.jsxs)("span",{children:[e.city,e.country?` (${e.country})`:""]}),(0,t.jsx)(j.ChevronRight,{size:14,className:"shrink-0 text-blue-500"})]},`${e.code}-${a}`))]}),"loading_stations"===M&&(0,t.jsxs)("li",{className:"autocomplete-item flex items-center gap-2 text-sm text-[var(--brand-text-muted)]",children:[(0,t.jsx)("div",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-[var(--brand-surface)] border-t-[var(--brand-primary)]"}),x("SEARCHING"),"..."]}),"stations"===M&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("li",{className:"sticky top-0 z-10 flex items-center gap-2 border-b border-blue-200 bg-blue-50 px-3 py-2",children:[(0,t.jsx)("button",{type:"button",onClick:function(){T([]),U(null),_(S.length>0?"cities":"idle")},className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-xs font-medium text-[var(--brand-primary)] hover:bg-blue-100 transition-colors",children:(0,t.jsx)(N.ChevronLeft,{size:14})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-blue-700",children:x("SELECT_LOCATION")}),O&&(0,t.jsxs)("div",{className:"text-[11px] text-blue-600",children:[O.city," (",O.country,")"]})]}),(0,t.jsx)("span",{className:"rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium text-blue-700",children:D.length})]}),D.map((e,a)=>(0,t.jsxs)("li",{className:"flex cursor-pointer items-center gap-2 border-b border-blue-50 bg-blue-50/40 px-3 py-2 text-sm text-[var(--brand-text)] transition-colors hover:bg-blue-100/60",onClick:()=>{let t,a,r;return F.current=!0,t=O?.city||"",E(a=e.name||e.code),void(n(r={station:e.code,code:e.code,name:a,city:t}),_("idle"),C([]),T([]),s&&s(r))},children:[(0,t.jsx)(h.MapPin,{size:14,className:"shrink-0 text-blue-500"}),(0,t.jsx)("span",{className:"flex-1",children:e.name})]},e.code||a))]})]}),d&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:d})]})}var w=e.i(9961),E=e.i(34712),S=e.i(56902);let C=[{code:"AL",name:"Alamo"},{code:"ZI",name:"Avis"},{code:"ZD",name:"Budget"},{code:"ZR",name:"Dollar"},{code:"ET",name:"Enterprise"},{code:"FX",name:"Fox"},{code:"ZE",name:"Hertz"},{code:"MX",name:"Mexcar"},{code:"ZL",name:"National"},{code:"ZA",name:"Payless"},{code:"SX",name:"Sixt"},{code:"ZT",name:"Thrifty"}],D={en:"US",es:"ES",fr:"FR",de:"DE",it:"IT",pt:"BR",da:"DK",fi:"FI",hu:"HU",is:"IS",nb:"NO",sv:"SE",zh:"CN",he:"IL",hi:"IN"};e.s(["default",0,function(){let e=(0,r.useTranslations)(),{lang:v,currency:g}=(0,s.useParams)(),{carPickup:b,carDropoff:y,carPickupDate:j,carDropoffDate:N,carPickupTime:T,carDropoffTime:M,carSameLocation:_,carDriverAge25:A,carNationality:R,setField:O}=(0,l.useSearch)(),U=(0,i.useBrand)(),P=(0,o.useDebug)(),L=!!U.header?.searchTabs,{addSearch:F}=(0,c.useRecentSearches)(),[I,z]=(0,a.useState)([]),[H,$]=(0,a.useState)([]),B=(0,a.useRef)(null),[K,G]=(0,a.useState)(!1),[V,W]=(0,a.useState)(""),[X,Y]=(0,a.useState)(""),[q,Z]=(0,a.useState)(null),[J,Q]=(0,a.useState)("pending");(0,a.useEffect)(()=>{fetch(`/api/hotels?method=detect_country&tz=${encodeURIComponent(Intl.DateTimeFormat().resolvedOptions().timeZone||"")}`).then(e=>e.ok?e.json():null).then(e=>{e?._debug&&Z(e._debug),e?.country_code?(Q("ip"),O("carNationality",e.country_code)):Q("lang-fallback")}
1).catch(()=>{Q("lang-fallback (fetch error)")})},[]);let ee=R||D[v]||"US",et=(0,a.useCallback)(e=>{$(t=>[...t.slice(-4),e])},[]),ea=(0,a.useMemo)(()=>(0,n.addDays)(new Date,2),[]);function er(){let e=(0,d.validateCarSearch)({pickup:b,pickupDate:j,dropoffDate:N});if(e.length>0)return void z(e);z([]),F({type:"car",pickup:b,dropoff:_?b:y,pickupDate:(0,u.formatDateForApi)(j),dropoffDate:(0,u.formatDateForApi)(N),pickupTime:T,dropoffTime:M,driverAge25:A,sameLocation:_});let t=V&&X?`${V}:${X}`:void 0,a=(0,m.buildCarSearchUrl)({pickup:b,dropoff:_?b:y,pickupDate:j,dropoffDate:N,pickupTime:T,dropoffTime:M,driverAge25:A,nationality:ee,discount:t,lang:v,currency:g});window.location.href=(0,m.withAffiliate)(a)}return(0,t.jsxs)("div",{children:[I.length>0&&(0,t.jsx)("div",{className:"mb-3 rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-600",children:I.map(t=>e(t)).join(". ")}),P&&(0,t.jsxs)("div",{className:"mb-2 space-y-0.5 overflow-x-auto rounded border border-yellow-200 bg-yellow-50 p-1.5 text-[10px]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Nationality:"})," ",ee," | ",(0,t.jsx)("strong",{children:"is_usa:"})," ","US"===ee?"1":"0"," | ",(0,t.jsx)("strong",{children:"source:"})," ",J," | ",(0,t.jsx)("strong",{children:"session:"})," ",R||"–"," | ",(0,t.jsx)("strong",{children:"lang fallback:"})," ",D[v]||"US"]}),q&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"IP debug:"})," raw_ip=",q.raw_ip||"–"," | resolved_ip=",q.resolved_ip||"–"," | country=",q.country||"–"," | api_ip=",q.api_ip||"–"," | source=",q.source||"–"]}),H.map((e,a)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("strong",{children:[e.label,":"]})," ",(0,t.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline break-all",children:e.url})]},a))]}),("US"!==ee||P)&&(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)(p.Globe,{size:16,className:"text-[var(--brand-text-muted)]"}),(0,t.jsxs)("label",{className:"text-xs text-[var(--brand-text-muted)]",children:[e("NATIONALITY"),":"]}),(0,t.jsx)("select",{value:ee,onChange:e=>O("carNationality",e.target.value),className:"rounded-md border border-[var(--border-color)] bg-[var(--brand-surface)] px-2 py-1 text-sm text-[var(--brand-text)] outline-none focus:border-[var(--brand-primary)]",children:f.default.map(e=>(0,t.jsx)("option",{value:e.code,children:e.name},e.code))})]}),(0,t.jsxs)("div",{className:`grid grid-cols-1 items-stretch gap-2 md:grid-cols-2 ${_?"lg:grid-cols-[2fr_1fr_auto_1fr_auto_auto]":"lg:grid-cols-[2fr_2fr_1fr_auto_1fr_auto_auto]"}`,children:[(0,t.jsx)("div",{className:_?"md:col-span-2 lg:col-span-1":"",children:(0,t.jsx)(k,{value:b,onChange:e=>O("carPickup",e),onSelect:()=>setTimeout(()=>B.current?.click(),0),placeholder:e("SEARCH_PICKUP"),label:e("PICK_UP"),icon:h.MapPin,nationality:ee,onDebugUrl:et})}),!_&&(0,t.jsx)("div",{children:(0,t.jsx)(k,{value:y,onChange:e=>O("carDropoff",e),placeholder:e("SEARCH_DROPOFF"),label:e("DROP_OFF"),icon:h.MapPin,nationality:ee,onDebugUrl:et})}),(0,t.jsx)("div",{children:(0,t.jsx)(w.default,{triggerRef:B,value:j,onChange:e=>O("carPickupDate",e),placeholder:e("PICK_UP_DATE"),label:e("PICK_UP_DATE"),minDate:ea})}),(0,t.jsx)("div",{children:(0,t.jsx)(E.default,{value:T,onChange:e=>O("carPickupTime",e),label:e("PICK_UP_TIME")})}),(0,t.jsx)("div",{children:(0,t.jsx)(w.default,{value:N,onChange:e=>O("carDropoffDate",e),placeholder:e("DROP_OFF_DATE"),label:e("DROP_OFF_DATE"),minDate:j||ea})}),(0,t.jsx)("div",{children:(0,t.jsx)(E.default,{value:M,onChange:e=>O("carDropoffTime",e),label:e("DROP_OFF_TIME")})}),(0,t.jsx)("div",{className:"hidden lg:flex lg:items-end",children:(0,t.jsx)(S.Button,{onClick:er,variant:"brand",className:"h-full px-6 capitalize",children:e("BUTTON_SEARCH")})})]}),L?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-4 px-4 py-2",style:{backgroundColor:"#00508b"},children:[(0,t.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 text-sm text-white",children:[(0,t.jsx)("input",{type:"checkbox",className:"h-4 w-4 accent-white",checked:!_,onChange:e=>O("carSameLocation",!e.target.checked)}),(0,t.jsx)("span",{children:e("SEARCH_VIEW_DROPOFF")})]}),U.features?.carDiscountCode&&(0,t.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 text-sm text-white",children:[(0,t.jsx)("input",{type:"checkbox",className:"h-4 w-4 accent-white",checked:K,onChange:e=>G(e.target.checked)}),(0,t.jsx)("span",{children:e("DISCOUNT_CODE")})]}),(0,t.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 text-sm text-white",children:[(0,t.jsx)("input",{type:"checkbox",className:"h-4 w-4 accent-white",checked:A,onChange:e=>O("carDriverAge25",e.target.checked)}),(0,t.jsx)("span",{children:e("SEARCH_DRIVER_AGE")})]}),(0,t.jsx)(S.Button,{onClick:er,variant:"brand",className:"ms-auto px-8 py-2.5 capitalize lg:hidden",children:e("BUTTON_SEARCH")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-2 mb-2",children:(0,t.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",className:"h-4 w-4 accent-[var(--brand-primary)]",checked:!_,onChange:e=>O("carSameLocation",!e.target.checked)}),(0,t.jsx)("span",{children:e("SEARCH_VIEW_DROPOFF")})]})}),U.features?.carDiscountCode&&(0,t.jsx)("div",{className:"mb-2",children:(0,t.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",className:"h-4 w-4 accent-[var(--brand-primary)]",checked:K,onChange:e=>G(e.target.checked)}),(0,t.jsx)("span",{children:e("DISCOUNT_CODE")})]})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,t.jsxs)("label",{className:"inline-flex cursor-pointer items-center gap-2 text-sm",children:[(0,t.jsx)("input",{type:"checkbox",className:"h-4 w-4 accent-[var(--brand-primary)]",checked:A,onChange:e=>O("carDriverAge25",e.target.checked)}),(0,t.jsx)("span",{children:e("SEARCH_DRIVER_AGE")})]}),(0,t.jsx)(S.Button,{onClick:er,variant:"brand",className:"ms-auto px-8 py-2.5 capitalize lg:hidden",children:e("BUTTON_SEARCH")})]})]}),U.features?.carDiscountCode&&K&&(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Tag,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("select",{value:V,onChange:e=>W(e.target.value),className:"w-full rounded-md border border-[var(--border-color)] bg-[var(--brand-surface)] py-2 pr-3 pl-9 text-sm text-[var(--brand-text)] outline-none focus:border-[var(--brand-primary)]",children:[(0,t.jsx)("option",{value:"",children:e("CAR_VENDOR")}
1),C.map(e=>(0,t.jsx)("option",{value:e.code,children:e.name},e.code))]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(x.Tag,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-[var(--brand-text-muted)]"}),(0,t.jsx)("input",{type:"text",value:X,onChange:e=>Y(e.target.value),placeholder:"Enter Your Code",autoComplete:"off",className:"w-full rounded-md border border-[var(--border-color)] bg-[var(--brand-surface)] py-2 pr-3 pl-9 text-sm text-[var(--brand-text)] outline-none focus:border-[var(--brand-primary)]"})]})]})]})}],2342)},28906,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(95727),n=e.i(48148),s=e.i(18566),l=e.i(58639),i=e.i(89979),o=e.i(31254),c=e.i(74589),d=e.i(44365),u=e.i(85176),m=e.i(10688),h=e.i(90064),p=e.i(46897),x=e.i(71757),f=e.i(7486),v=e.i(37727),g=e.i(56902),b=e.i(97921),y=e.i(41931),j=e.i(67418),N=e.i(76668);e.s(["default",0,function({prefill:e,searchData:k}={}){let w=(0,n.useTranslations)(),E=(0,h.useDebug)(),{hotel:S}=(0,j.useDebugServices)(E),{lang:C,currency:D}=(0,s.useParams)(),{hotelDestination:T,hotelCheckIn:M,hotelCheckOut:_,hotelRooms:A,setField:R}=(0,l.useSearch)(),O=(0,a.useMemo)(()=>{let e=new Date;return e.setDate(e.getDate()+7),e.setHours(0,0,0,0),e},[]),U=M||O,P=_||(0,r.addDays)(U,1),[L,F]=(0,a.useState)(k?.forceService||""),{addSearch:I}=(0,o.useRecentSearches)(),[z,H]=(0,a.useState)(T?.name||""),[$,B]=(0,a.useState)([]),[K,G]=(0,a.useState)(!1),[V,W]=(0,a.useState)(!1),[X,Y]=(0,a.useState)(-1),[q,Z]=(0,a.useState)([]),J=(0,i.useDebounce)(z,u.AUTOCOMPLETE_DEBOUNCE_MS),Q=(0,a.useRef)(null),ee=(0,a.useRef)(null),et=(0,a.useRef)(!1);(0,a.useEffect)(()=>{function e(e){Q.current&&!Q.current.contains(e.target)&&G(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.useEffect)(()=>{e&&((e.geo||e.city)&&(R("hotelDestination",{geoId:e.geo,name:e.city,type:"locality"}),H(e.city)),e.arrival&&R("hotelCheckIn",(0,m.parseLocalDate)(e.arrival)),e.leave&&R("hotelCheckOut",(0,m.parseLocalDate)(e.leave)),e.rooms&&R("hotelRooms",(0,d.parseRoomsFromParams)(e)))},[e,R]),(0,a.useEffect)(()=>{if(!et.current)return;if(et.current=!1,J.length<u.AUTOCOMPLETE_MIN_CHARS){B([]),G(!1);return}let e=!1;return W(!0),fetch(`/api/hotels?method=autocomplete&q=${encodeURIComponent(J)}`).then(e=>e.json()).then(t=>{e||(B(Array.isArray(t)?t:[]),G(!0),W(!1),Y(-1))}).catch(()=>{e||(B([]),W(!1))}),()=>{e=!0}},[J]),(0,a.useEffect)(()=>{T?.name&&T.name!==z&&H(T.name)},[T]);let ea=(0,a.useCallback)(e=>{let t={geoId:e.geo,name:e.mainText,type:e.type||"locality"};H(e.mainText),R("hotelDestination",t),G(!1),setTimeout(()=>ee.current?.click(),0)},[R]),er=(0,a.useCallback)(()=>(0,c.validateHotelSearch)({destination:T,checkIn:U,checkOut:P,rooms:A}).length>0?null:(0,d.withAffiliate)((0,d.buildHotelSearchUrl)({destination:T,checkIn:U,checkOut:P,rooms:A,lang:C,currency:D,forceService:L})),[T,U,P,A,C,D,L]),en=(0,a.useCallback)(()=>{let e=er();e&&(0,N.setTabUnderDestination)(e)},[er]);return(0,t.jsxs)("div",{"data-search-form":"",children:[q.length>0&&(0,t.jsx)("div",{className:"mb-3 rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-600",children:q.map(e=>w(e)).join(". ")}),(0,t.jsxs)("div",{className:"grid grid-cols-1 items-stretch gap-2 md:grid-cols-[1fr_1fr_1fr_auto]",children:[(0,t.jsxs)("div",{className:"relative",ref:Q,children:[(0,t.jsxs)("div",{className:"form-input relative overflow-hidden rounded-md px-3 pe-4 pt-1.5 pb-2",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(p.MapPin,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:"Location"}),(0,t.jsx)("input",{type:"text",className:"block h-5 w-full bg-transparent text-sm leading-5 outline-none placeholder:text-[var(--brand-text-muted)]",placeholder:w("SEARCH_FORM_HOTELS"),value:z,onChange:e=>{et.current=!0,H(e.target.value),e.target.value||R("hotelDestination",null)},onFocus:()=>{z&&H("")},onKeyDown:e=>{K&&0!==$.length&&("ArrowDown"===e.key?(e.preventDefault(),Y(e=>Math.min(e+1,$.length-1))):"ArrowUp"===e.key?(e.preventDefault(),Y(e=>Math.max(e-1,0))):"Enter"===e.key&&X>=0?(e.preventDefault(),ea($[X])):"Escape"===e.key&&G(!1))},autoComplete:"off"})]})]}),z&&!V&&(0,t.jsx)("button",{type:"button",onClick:()=>{H(""),R("hotelDestination",null),B([]),G(!1)}
1,className:"absolute end-2 top-1/2 -translate-y-1/2 rounded-full p-0.5 text-[var(--brand-text-muted)] hover:text-[var(--brand-text)]",children:(0,t.jsx)(v.X,{className:"h-4 w-4"})}),V&&(0,t.jsx)("div",{className:"absolute end-2 top-1/2 -translate-y-1/2",children:(0,t.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--brand-surface)] border-t-[var(--brand-primary)]"})})]}),K&&$.length>0&&(0,t.jsx)("ul",{className:"autocomplete-dropdown absolute left-0 top-full z-50 mt-1 max-h-72 w-full overflow-y-auto rounded-lg",children:$.map((e,a)=>{var r;let n;return(0,t.jsxs)("li",{className:`autocomplete-item flex cursor-pointer items-center gap-2 text-sm ${a===X?"bg-[var(--brand-surface)]":""}`,"data-highlighted":a===X?"":void 0,onClick:()=>ea(e),onMouseEnter:()=>Y(a),children:[(r=e.type,n="h-4 w-4 shrink-0 text-[var(--brand-primary)]","airport"===r?(0,t.jsx)(x.Plane,{className:n}):"point_of_interest"===r||"establishment"===r?(0,t.jsx)(f.Building2,{className:n}):(0,t.jsx)(p.MapPin,{className:n})),(0,t.jsxs)("span",{className:"text-[var(--brand-text)]",children:[(0,t.jsx)("span",{className:"font-medium",children:e.mainText}),e.secondaryText&&(0,t.jsx)("span",{className:"ms-1 text-[var(--brand-text-muted)]",children:e.secondaryText})]})]},`${e.geo}-${a}`)})})]}),(0,t.jsx)("div",{children:(0,t.jsx)(b.default,{triggerRef:ee,startDate:U,endDate:P,onStartChange:e=>R("hotelCheckIn",e),onEndChange:e=>R("hotelCheckOut",e),label:"Dates"})}),(0,t.jsx)("div",{children:(0,t.jsx)(y.default,{label:"Rooms & Guests",rooms:A,onChange:e=>R("hotelRooms",e)})}),(0,t.jsx)("div",{children:(0,t.jsx)(g.Button,{onPointerDown:en,onClick:function(){let e=(0,c.validateHotelSearch)({destination:T,checkIn:U,checkOut:P,rooms:A});if(e.length>0)return void Z(e);Z([]),I({type:"hotel",destination:T,checkIn:(0,m.formatDateForApi)(U),checkOut:(0,m.formatDateForApi)(P),rooms:A});let t=er();t&&(0,N.navigateUnlessAdTookTab)(t)},variant:"brand",className:"px-8 py-2.5 capitalize  h-full w-full",children:w("BUTTON_SEARCH")})})]}),E&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"mb-1 block text-xs font-medium text-red-500",children:"Service"}),(0,t.jsxs)("select",{value:L,onChange:e=>F(e.target.value),className:"rounded-md border-2 border-red-500 bg-red-50 px-3 py-2.5 text-sm font-semibold text-red-700 focus:ring-2 focus:ring-red-400 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All"}),(S||[]).map(e=>(0,t.jsx)("option",{value:e,children:(0,j.getHotelServiceLabel)(e)},e))]})]})]})}])},56840,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(48148),n=e.i(18566),s=e.i(58639),l=e.i(89979),i=e.i(31254),o=e.i(10688),c=e.i(44365),d=e.i(85176),u=e.i(90064),m=e.i(52077),h=e.i(46897),p=e.i(71757),x=e.i(7486),f=e.i(37727),v=e.i(55436);e.i(96987);var g=e.i(3914),b=e.i(97921),y=e.i(41931),j=e.i(56902),N=e.i(67418);let k=[{value:"Y",label:"CLASS_ALL"},{value:"C",label:"CLASS_BUSINESS"},{value:"F",label:"CLASS_FIRST"}];function w({options:e,active:r,onChange:n,t:s}){let[l,i]=(0,a.useState)(!1),o=(0,a.useRef)(null),c=e.find(e=>e.value===r);return(0,a.useEffect)(()=>{if(!l)return;let e=e=>{o.current&&!o.current.contains(e.target)&&i(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[l]),(0,t.jsxs)("div",{className:"relative mb-2",ref:o,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>i(e=>!e),className:"flex items-center gap-1 text-sm text-white cursor-pointer",children:[c?s(c.label)||c.label:"",(0,t.jsx)("svg",{className:`h-3 w-3 transition-transform ${l?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),l&&(0,t.jsx)("div",{className:"absolute start-0 top-full z-50 mt-1 min-w-40 rounded bg-[var(--bg-card)] py-1 shadow-lg border border-[var(--border-color)]",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{n(e.value),i(!1)},className:`block w-full px-4 py-2 text-start text-sm transition-colors cursor-pointer ${e.value===r?"bg-[var(--brand-primary)] text-white":"text-[#333] hover:bg-gray-100"}`,children:s(e.label)||e.label},e.value))})]})}e.s(["default",0,function({searchData:e}={}){let E=(0,r.useTranslations)(),S=(0,m.useBrand)(),C=(0,u.useDebug)(),{flight:D,hotel:T}=(0,N.useDebugServices)(C),M=(0,n.useParams)(),_=M?.lang||"en",A=M?.currency||"usd",{origin:R,hotelDestination:O,departDate:U,returnDate:P,hotelRooms:L,setField:F}
1=(0,s.useSearch)(),{addSearch:I}=(0,i.useRecentSearches)(),[z,H]=(0,a.useState)("Y"),[$,B]=(0,a.useState)(!1),[K,G]=(0,a.useState)(e?.forceServiceF||""),[V,W]=(0,a.useState)(e?.forceServiceH||""),[X,Y]=(0,a.useState)(O?.name||""),[q,Z]=(0,a.useState)([]),[J,Q]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(!1),[ea,er]=(0,a.useState)(-1),en=(0,l.useDebounce)(X,d.AUTOCOMPLETE_DEBOUNCE_MS),es=(0,a.useRef)(null),el=(0,a.useRef)(null),ei=(0,a.useRef)(null),eo=(0,a.useRef)(!1);(0,a.useEffect)(()=>{function e(e){es.current&&!es.current.contains(e.target)&&Q(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.useEffect)(()=>{if(!eo.current)return;if(eo.current=!1,en.length<d.AUTOCOMPLETE_MIN_CHARS){Z([]),Q(!1);return}let e=!1;return et(!0),fetch(`/api/hotels?method=autocomplete&q=${encodeURIComponent(en)}`).then(e=>e.json()).then(t=>{e||(Z(Array.isArray(t)?t:[]),Q(!0),et(!1),er(-1))}).catch(()=>{e||(Z([]),et(!1))}),()=>{e=!0}},[en]),(0,a.useEffect)(()=>{O?.name&&O.name!==X&&Y(O.name)},[O]);let ec=(0,a.useCallback)(e=>{Y(e.mainText),F("hotelDestination",{geoId:e.geo,name:e.mainText,type:e.type||"locality"}),Q(!1),setTimeout(()=>ei.current?.click(),0)},[F]);async function ed(){if(R?.code&&O?.geoId&&U&&P){B(!0);try{let[e,t]=(O.geoId||"").split(";"),a="";if(e&&t){let r=await fetch(`/api/flights?method=closest_airport&lat=${e}&lon=${t}&limit=1`),n=await r.json();a=n?.[0]?.airportcode||""}I({type:"package",origin:R,destination:a?{code:a}:void 0,departDate:(0,o.formatDateForApi)(U),returnDate:(0,o.formatDateForApi)(P),city:O.name||"",geo:O.geoId||"",rooms:L,cabin:z});let r=(0,c.buildPackageSearchUrl)({origin:R,destination:a?{code:a}:void 0,departDate:U,returnDate:P,hotelDestination:O,rooms:L,cabin:z,geo:O.geoId,city:O.name,lang:_,currency:A,forceFlightService:K,forceHotelService:V});window.location.href=(0,c.withAffiliate)(r)}catch{let e=(0,c.buildPackageSearchUrl)({origin:R,destination:void 0,departDate:U,returnDate:P,hotelDestination:O,rooms:L,cabin:z,geo:O.geoId,city:O.name,lang:_,currency:A});window.location.href=(0,c.withAffiliate)(e)}finally{B(!1)}}}return(0,t.jsxs)("div",{className:"space-y-2",children:[S.header?.searchTabs?(0,t.jsx)(w,{options:k,active:z,onChange:H,t:E}):(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("label",{className:"ms-1 text-xs font-medium text-gray-500",children:[E("CABIN_CLASS"),":"]}),(0,t.jsx)("div",{className:"flex gap-1.5",children:k.map(e=>(0,t.jsx)("button",{onClick:()=>H(e.value),className:`rounded-full border px-3 py-1 text-xs font-medium transition-colors ${z===e.value?"border-[var(--brand-primary)] bg-[var(--brand-primary)] text-white":"border-gray-300 text-gray-600 hover:border-gray-400"}`,children:E(e.label)||e.label},e.value))})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 items-stretch gap-2 sm:grid-cols-2 lg:grid-cols-[1fr_1fr_1fr_1fr_auto]",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(g.default,{value:R,onChange:e=>F("origin",e),onSelect:()=>setTimeout(()=>el.current?.focus(),0),placeholder:E("SEARCH_ORIGIN"),label:"Origin"}),(0,t.jsx)("div",{className:"absolute bottom-0 left-2/3 z-10 -translate-x-1/2 translate-y-1/2 md:bottom-auto md:left-full md:top-1/2 md:-translate-y-1/2"})]}),(0,t.jsxs)("div",{className:"relative",ref:es,children:[(0,t.jsxs)("div",{className:"form-input relative overflow-hidden rounded-md px-3 pe-4 pt-1.5 pb-2",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.MapPin,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:"Destination"}),(0,t.jsx)("input",{ref:el,type:"text",className:"block h-5 w-full bg-transparent text-sm leading-5 outline-none placeholder:text-[var(--brand-text-muted)]",placeholder:E("SEARCH_DESTINATION"),value:X,onChange:e=>{eo.current=!0,Y(e.target.value),e.target.value||F("hotelDestination",null)},onFocus:()=>{X&&Y("")},onKeyDown:e=>{J&&0!==q.length&&("ArrowDown"===e.key?(e.preventDefault(),er(e=>Math.min(e+1,q.length-1))):"ArrowUp"===e.key?(e.preventDefault(),er(e=>Math.max(e-1,0))):"Enter"===e.key&&ea>=0?(e.preventDefault(),ec(q[ea])):"Escape"===e.key&&Q(!1))},autoComplete:"off"})]})]}),X&&!ee&&(0,t.jsx)("button",{type:"button",onClick:()=>{Y(""),F("hotelDestination",null),Z([]),Q(!1)}
1,className:"absolute end-2 top-1/2 -translate-y-1/2 rounded-full p-0.5 text-[var(--brand-text-muted)] hover:text-[var(--brand-text)]",children:(0,t.jsx)(f.X,{className:"h-4 w-4"})}),ee&&(0,t.jsx)("div",{className:"absolute end-2 top-1/2 -translate-y-1/2",children:(0,t.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--brand-surface)] border-t-[var(--brand-primary)]"})})]}),J&&q.length>0&&(0,t.jsx)("ul",{className:"autocomplete-dropdown absolute left-0 top-full z-50 mt-1 max-h-72 w-full overflow-y-auto rounded-lg",children:q.map((e,a)=>{var r;let n;return(0,t.jsxs)("li",{className:`autocomplete-item flex cursor-pointer items-center gap-2 text-sm ${a===ea?"bg-[var(--brand-surface)]":""}`,"data-highlighted":a===ea?"":void 0,onClick:()=>ec(e),onMouseEnter:()=>er(a),children:[(r=e.type,n="h-4 w-4 shrink-0 text-[var(--brand-primary)]","airport"===r?(0,t.jsx)(p.Plane,{className:n}):"point_of_interest"===r||"establishment"===r?(0,t.jsx)(x.Building2,{className:n}):(0,t.jsx)(h.MapPin,{className:n})),(0,t.jsxs)("span",{className:"text-[var(--brand-text)]",children:[(0,t.jsx)("span",{className:"font-medium",children:e.mainText}),e.secondaryText&&(0,t.jsx)("span",{className:"ms-1 text-[var(--brand-text-muted)]",children:e.secondaryText})]})]},`${e.geo}-${a}`)})})]}),(0,t.jsx)("div",{children:(0,t.jsx)(b.default,{triggerRef:ei,startDate:U,endDate:P,onStartChange:e=>F("departDate",e),onEndChange:e=>F("returnDate",e),label:"Dates"})}),(0,t.jsx)("div",{children:(0,t.jsx)(y.default,{rooms:L,onChange:e=>F("hotelRooms",e),label:"Rooms & Guests"})}),(0,t.jsx)("div",{className:"sm:col-span-2 lg:col-span-1",children:(0,t.jsxs)(j.Button,{onClick:ed,disabled:$,variant:"brand",className:"h-full w-full px-8 py-2.5 gap-0.5 capitalize",children:["skyholidays"===S.id&&(0,t.jsx)(v.Search,{size:24,className:"me-0.5"}),E("BUTTON_SEARCH")]})})]}),C&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"mb-1 block text-xs font-medium text-red-500",children:"Flight Service"}),(0,t.jsxs)("select",{value:K,onChange:e=>G(e.target.value),className:"rounded-md border-2 border-red-500 bg-red-50 px-3 py-2.5 text-sm font-semibold text-red-700 focus:ring-2 focus:ring-red-400 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All"}),(D||[]).map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"mb-1 block text-xs font-medium text-red-500",children:"Hotel Service"}),(0,t.jsxs)("select",{value:V,onChange:e=>W(e.target.value),className:"rounded-md border-2 border-red-500 bg-red-50 px-3 py-2.5 text-sm font-semibold text-red-700 focus:ring-2 focus:ring-red-400 focus:outline-none",children:[(0,t.jsx)("option",{value:"",children:"All"}),(T||[]).map(e=>(0,t.jsx)("option",{value:e,children:(0,N.getHotelServiceLabel)(e)},e))]})]})]})]})}])},15610,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(48148),n=e.i(18566),s=e.i(58639),l=e.i(31254),i=e.i(10688),o=e.i(44365),c=e.i(61911),d=e.i(63727),u=e.i(52077),m=e.i(34382),h=e.i(46897),p=e.i(37727);let x=["places"];function f({value:e,onChange:r,onSelect:n,placeholder:s,label:l,error:i,focusRef:o}){let[c,d]=(0,a.useState)(e?.name||""),[u,v]=(0,a.useState)([]),[g,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)(!1),[N,k]=(0,a.useState)(-1),[w,E]=(0,a.useState)(!1),S=(0,a.useRef)(null),C=(0,a.useRef)(null),D=(0,a.useRef)(!1),T=(0,a.useRef)(null),M=(0,a.useRef)(null),_=(0,a.useRef)(c);_.current=c;let A=(0,a.useRef)(e);A.current=e,(0,a.useEffect)(()=>{o&&(o.current=C.current)},[o]);let{isLoaded:R,loadError:O}=(0,m.useJsApiLoader)({googleMapsApiKey:"AIzaSyA3AfcRNR5Va3FnUgGlmMT-HORhSHMiwLk",libraries:x});(0,a.useEffect)(()=>{O&&E(!0)},[O]),(0,a.useEffect)(()=>{R&&window.google?.maps?.places&&(T.current=new window.google.maps.places.AutocompleteService)},[R]),(0,a.useEffect)(()=>{function e(e){if(S.current&&!S.current.contains(e.target)){b(!1),v([]);let e=_.current,t=A.current;e&&!t?.name&&r({name:e.trim()})}}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.useEffect)(()=>{e?.name&&e.name!==_.current&&(D.current=!1,d(e.name)),!e&&_.current&&d("")},[e]);let U=(0,a.useCallback)(e=>{if(!T.current||e.length<2){v([]),b(!1);return}j(!0),T.current.getPlacePredictions({input:e,types:["geocode","establishment"]},(e,t)=>{j(!1),D.current&&(t===window.google.maps.places.PlacesServiceStatus.OK&&e?(v(e),b(!0),k(-1)):v([]))})},[]);function P(e){let t=e.description;
1D.current=!1,clearTimeout(M.current),d(t);let a={name:t};r(a),v([]),b(!1),n&&n(a)}return(0,t.jsxs)("div",{className:"relative",ref:S,children:[(0,t.jsxs)("div",{className:`form-input relative overflow-hidden rounded-md px-3 pe-8 pt-1.5 pb-2 ${i?"border-red-500":""}`,children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.MapPin,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[l&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:l}),(0,t.jsx)("input",{ref:C,type:"text",className:"block h-5 w-full bg-transparent text-sm leading-5 outline-none placeholder:text-[var(--brand-text-muted)]",placeholder:s,value:c,onChange:function(e){let t=e.target.value;if(D.current=!0,d(t),A.current?.name&&r(null),!t){r(null),v([]),b(!1);return}w?r({name:t.trim()}):(clearTimeout(M.current),M.current=setTimeout(()=>{D.current&&U(t)},300))},onFocus:()=>{D.current=!0,c&&!w&&U(c)},onKeyDown:function(e){g&&0!==u.length&&("ArrowDown"===e.key?(e.preventDefault(),k(e=>Math.min(e+1,u.length-1))):"ArrowUp"===e.key?(e.preventDefault(),k(e=>Math.max(e-1,0))):"Enter"===e.key&&N>=0?(e.preventDefault(),P(u[N])):"Escape"===e.key&&b(!1))},autoComplete:"off"})]})]}),c&&!y&&(0,t.jsx)("button",{type:"button",onClick:()=>{d(""),r(null),v([]),b(!1)},className:"absolute end-4 top-1/2 -translate-y-1/2 rounded-full p-0.5 text-[var(--brand-text-muted)] hover:text-[var(--brand-text)]",children:(0,t.jsx)(p.X,{className:"h-4 w-4"})}),y&&(0,t.jsx)("div",{className:"absolute end-4 top-1/2 -translate-y-1/2",children:(0,t.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--brand-surface)] border-t-[var(--brand-primary)]"})})]}),g&&u.length>0&&(0,t.jsx)("ul",{className:"autocomplete-dropdown absolute left-0 top-full z-50 mt-1 max-h-72 w-full overflow-y-auto rounded-lg",children:u.map((e,a)=>(0,t.jsxs)("li",{className:`autocomplete-item flex cursor-pointer items-center gap-2 text-sm ${a===N?"bg-[var(--brand-surface)]":""}`,onMouseDown:t=>{t.preventDefault(),P(e)},onMouseEnter:()=>k(a),children:[(0,t.jsx)(h.MapPin,{size:14,className:"shrink-0 text-[var(--brand-primary)]"}),(0,t.jsxs)("span",{className:"text-[var(--brand-text)]",children:[(0,t.jsx)("span",{className:"font-medium",children:e.structured_formatting?.main_text}),e.structured_formatting?.secondary_text&&(0,t.jsx)("span",{className:"ms-1 text-[var(--brand-text-muted)]",children:e.structured_formatting.secondary_text})]})]},e.place_id))}),i&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:i})]})}var v=e.i(96987),g=e.i(9961),b=e.i(34712),y=e.i(56902),j=e.i(27166);function N({isRoundtrip:e,onChange:r,t:n}){let[s,l]=(0,a.useState)(!1),i=(0,a.useRef)(null),o=[{key:"one",label:n("TRANSFER_ONEWAY")},{key:"round",label:n("TRANSFER_ROUNDTRIP")}],c=e?"round":"one";return(0,a.useEffect)(()=>{if(!s)return;let e=e=>{i.current&&!i.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]),(0,t.jsxs)("div",{className:"relative mb-2",ref:i,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"flex items-center gap-1 text-sm text-white cursor-pointer",children:[o.find(e=>e.key===c)?.label,(0,t.jsx)("svg",{className:`h-3 w-3 transition-transform ${s?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),s&&(0,t.jsx)("div",{className:"absolute start-0 top-full z-50 mt-1 min-w-40 rounded bg-[var(--bg-card)] py-1 shadow-lg border border-[var(--border-color)]",children:o.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{r(e.key),l(!1)},className:`block w-full px-4 py-2 text-start text-sm transition-colors cursor-pointer ${e.key===c?"bg-[var(--brand-primary)] text-white":"text-[#333] hover:bg-gray-100"}`,children:e.label},e.key))})]})}e.s(["default",0,function(){let e=(0,r.useTranslations)(),{lang:m,currency:h}=(0,n.useParams)(),{transferFrom:p,transferTo:x,transferDate:k,transferTime:w,transferPassengers:E,transferReturnDate:S,transferReturnTime:C,transferSuitcases:D,transferTrip:T,setField:M}
1=(0,s.useSearch)(),_=(0,u.useBrand)(),{addSearch:A}=(0,l.useRecentSearches)(),[R,O]=(0,a.useState)([]),U=!!_.header?.searchTabs,P=(0,a.useRef)(null),L=(0,a.useRef)(null),F="round"===T;return(0,t.jsxs)("div",{children:[R.length>0&&(0,t.jsx)("div",{className:"mb-3 rounded border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-600",children:R.join(". ")}),U?(0,t.jsx)(N,{isRoundtrip:F,onChange:e=>M("transferTrip",e),t:e}):(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-1",children:[(0,t.jsx)("button",{type:"button",onClick:()=>M("transferTrip","one"),className:(0,j.cn)("rounded-full px-4 py-1.5 text-sm font-medium transition-colors",F?"bg-[var(--brand-surface)] text-[var(--brand-text)] hover:bg-gray-100":"bg-[var(--brand-primary)] text-white"),children:e("TRANSFER_ONEWAY")}),(0,t.jsx)("button",{type:"button",onClick:()=>M("transferTrip","round"),className:(0,j.cn)("rounded-full px-4 py-1.5 text-sm font-medium transition-colors",F?"bg-[var(--brand-primary)] text-white":"bg-[var(--brand-surface)] text-[var(--brand-text)] hover:bg-gray-100"),children:e("TRANSFER_ROUNDTRIP")})]}),(0,t.jsxs)("div",{className:(0,j.cn)("grid grid-cols-1 items-stretch gap-2 md:grid-cols-2",F?"lg:grid-cols-[2fr_2fr_1fr_auto_1fr_auto_auto_auto_auto]":"lg:grid-cols-[2fr_2fr_1fr_auto_auto_auto_auto]"),children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(f,{value:p,onChange:e=>M("transferFrom",e),onSelect:()=>setTimeout(()=>P.current?.focus(),0),placeholder:e("TRANSFER_SEARCH_FROM_PH"),label:e("TRANSFER_FROM")}),(0,t.jsx)("div",{className:"absolute bottom-0 left-1/2 z-10 -translate-x-1/2 translate-y-1/2 md:bottom-auto md:left-full md:top-1/2 md:-translate-y-1/2",children:(0,t.jsx)(v.default,{onSwap:function(){M("transferFrom",x),M("transferTo",p)}})})]}),(0,t.jsx)("div",{children:(0,t.jsx)(f,{value:x,onChange:e=>M("transferTo",e),onSelect:()=>setTimeout(()=>L.current?.click(),0),focusRef:P,placeholder:e("TRANSFER_SEARCH_TO_PH"),label:e("TRANSFER_TO")})}),(0,t.jsx)("div",{children:(0,t.jsx)(g.default,{triggerRef:L,value:k,onChange:e=>{M("transferDate",e),e&&S&&S<e&&M("transferReturnDate",null)},placeholder:e("DATE_DEPARTURE"),label:e("TRANSFER_DATETIME")})}),(0,t.jsx)("div",{children:(0,t.jsx)(b.default,{value:w,onChange:e=>M("transferTime",e),label:e("TIME")})}),F&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:(0,t.jsx)(g.default,{value:S,onChange:e=>M("transferReturnDate",e),placeholder:e("DATE_RETURN"),label:e("DATE_RETURN"),minDate:k||void 0})}),(0,t.jsx)("div",{children:(0,t.jsx)(b.default,{value:C,onChange:e=>M("transferReturnTime",e),label:e("TIME")})})]}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"form-input overflow-hidden rounded-md px-3 pt-1.5 pb-2",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(c.Users,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:e("TRANSFER_PASSENGERS")}),(0,t.jsx)("select",{className:"h-5 w-full bg-transparent text-sm leading-5 outline-none",value:E,onChange:e=>M("transferPassengers",parseInt(e.target.value,10)),children:Array.from({length:20},(e,t)=>t+1).map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]})})}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"form-input overflow-hidden rounded-md px-3 pt-1.5 pb-2",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(d.Briefcase,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:e("TRANSFER_SUITCASES")}),(0,t.jsx)("select",{className:"h-5 w-full bg-transparent text-sm leading-5 outline-none",value:D,onChange:e=>M("transferSuitcases",parseInt(e.target.value,10)),children:Array.from({length:11},(e,t)=>t).map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]})})}),(0,t.jsx)("div",{className:"md:col-span-2 lg:col-span-1",children:(0,t.jsx)(y.Button,{onClick:function(){let t=[];if(p||t.push(e("PLEASE_FROM")),x||t.push(e("PLEASE_TO")),k||t.pu
1sh(e("PLEASE_DATE_DEPART")),F&&!S&&t.push(e("PLEASE_DATE_ARRIVE")),t.length>0)return void O(t);O([]),A({type:"transfer",from:p,to:x,date:(0,i.formatDateForApi)(k),time:w,passengers:E,suitcases:D,trip:T,returnDate:F&&S?(0,i.formatDateForApi)(S):void 0,returnTime:F?C:void 0});let a=(0,o.buildTransferSearchUrl)({from:p,to:x,date:k,time:w,passengers:E,suitcases:D,trip:T,returnDate:S,returnTime:C,lang:m,currency:h});window.location.href=(0,o.withAffiliate)(a)},variant:"brand",className:"h-full w-full px-8 py-2.5 capitalize",children:e("BUTTON_SEARCH")})})]})]})}],15610)},3914,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(18566),n=e.i(48148),s=e.i(89979),l=e.i(85176),i=e.i(46897),o=e.i(37727);let c=()=>(0,t.jsx)("svg",{className:"h-4 w-4 shrink-0 text-[var(--brand-primary)]",fill:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"m3.64 14.26 2.86.95 4.02-4.02-8-4.59 1.16-1.16c.1-.1.26-.14.41-.1l9.3 2.98c1.58-1.58 3.15-3.2 4.77-4.75.31-.33.7-.58 1.16-.73.45-.16.87-.27 1.25-.34.55-.05.98.4.93.93-.07.38-.18.8-.34 1.25-.15.46-.4.85-.73 1.16l-4.75 4.78 2.97 9.29c.05.15 0 .29-.1.41l-1.17 1.16-4.57-8.02L8.8 17.5l.95 2.84L8.6 21.5l-2.48-3.62L2.5 15.4l1.14-1.14z"})}),d=()=>(0,t.jsx)("svg",{className:"h-4 w-4 shrink-0 text-[var(--brand-primary)]",fill:"currentColor",viewBox:"0 0 448 512",children:(0,t.jsx)("path",{d:"M436 480h-20V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v456H12c-6.627 0-12 5.373-12 12v20h448v-20c0-6.627-5.373-12-12-12zM128 76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76zm0 96c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40zm52 148h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12zm76 160h-64v-84c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v84zm64-172c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40zm0-96c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12V76c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40z"})}),u=()=>(0,t.jsx)("svg",{className:"h-4 w-4 shrink-0 text-[var(--brand-primary)]",fill:"currentColor",viewBox:"0 0 448 512",children:(0,t.jsx)("path",{d:"M96 0C43 0 0 43 0 96L0 352c0 48 35.2 87.7 81.1 94.9l-46 46C28.1 499.9 33.1 512 43 512l39.7 0c8.5 0 16.6-3.4 22.6-9.4L160 448l128 0 54.6 54.6c6 6 14.1 9.4 22.6 9.4l39.7 0c10 0 15-12.1 7.9-19.1l-46-46c46-7.1 81.1-46.9 81.1-94.9l0-256c0-53-43-96-96-96L96 0zM64 96c0-17.7 14.3-32 32-32l256 0c17.7 0 32 14.3 32 32l0 96c0 17.7-14.3 32-32 32L96 224c-17.7 0-32-14.3-32-32l0-96zM224 288a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"})});function m({type:e,hasMultipleAirports:a}){return"station"===e?(0,t.jsx)(u,{}):"city"===e||a?(0,t.jsx)(d,{}):(0,t.jsx)(c,{})}let h=new Map;e.s(["default",0,function({value:e,onChange:c,onSelect:d,placeholder:u,label:p,icon:x=i.MapPin,error:f,focusRef:v}){let{lang:g}=(0,r.useParams)(),b=(0,n.useTranslations)(),[y,j]=(0,a.useState)(e?.name||""),[N,k]=(0,a.useState)([]),[w,E]=(0,a.useState)(!1),[S,C]=(0,a.useState)(!1),[D,T]=(0,a.useState)(-1),M=(0,s.useDebounce)(y,l.AUTOCOMPLETE_DEBOUNCE_MS),_=(0,a.useRef)(null),A=(0,a.useRef)(null),R=(0,a.useRef)(!1);(0,a.useEffect)(()=>{v&&(v.current=A.current)},[v]),(0,a.useEffect)(()=>{function e(e){_.current&&!_.current.contains(e.target)&&E(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,a.useEffect)(()=>{if(M.length<l.AUTOCOMPLETE_MIN_CHARS){k([]),E(!1);return}if(!R.current)return;let e=!1;return C(!0),fetch(`/api/airports?q=${encodeURIComponent(M)}&lang=${g||"en"}`).then(e=>e.json()).then(t=>{e||(k(Array.isArray(t)?t:[]),E(!0),C(!1),T(-1))}).catch(()=>{e||(k([]),C(!1))}),()=>{e=!0}},[M,g]),(0,a.useEffect)(()=>{e?.name&&e.name!==y&&(R.current=!1,j(e.name))},[e]),(0,a.useEffect)(()=>{if(!e?.code||!e.name||e.name!==e.code)return;let t=h.get(e.code);if(t){j(t.name),c(t);return}let a=!1;return fetch(`/api/airports?q=${encodeURIComponent(e.code)}&lang=${g||"en"}`).then(e=>e.json()).then(t=>{if(a||!Array.isArray(t))return;let r=t.find(t=>t.code===e.code);
1if(!r){for(let a of t)if(a.airports&&(r=a.airports.find(t=>t.code===e.code)))break}if(r){let t=`${r.code} – ${r.city||r.name} (${r.country})`,a={...e,name:t,city:r.city||r.name,country:r.country};h.set(e.code,a),j(t),c(a)}}).catch(()=>{}),()=>{a=!0}},[e?.code,e?.name]);let O=[];for(let e of N)if(O.push(e),e.airports?.length>0)for(let t of e.airports)O.push({...t,_isSub:!0});let U=(0,a.useCallback)(e=>{let t={code:e.code,name:`${e.code} – ${e.city||e.name} (${e.country})`,city:e.city||e.name,country:e.country,type:e.type||"airport"};R.current=!1,j(t.name),c(t),E(!1),d&&d(t)},[c,d]),P=(e,a,r=!1,n=!1,s=!1)=>(0,t.jsxs)("li",{className:`autocomplete-item flex cursor-pointer items-center gap-2 text-sm ${r?"ps-12! autocomplete-sub-item":""} ${s?"autocomplete-sub-last":""} ${a===D?"bg-[var(--brand-surface)]":""}`,"data-highlighted":a===D?"":void 0,onClick:()=>U(e),onMouseEnter:()=>T(a),children:[(0,t.jsx)(m,{type:e.type,hasMultipleAirports:!r&&n}),(0,t.jsx)("span",{className:"text-[var(--brand-text)]",children:!r&&n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-medium",children:e.city}),(0,t.jsxs)("span",{className:"ms-1 text-[var(--brand-text-muted)]",children:["· ",b("ALL_AIRPORTS")," (",e.country,")"]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-medium",children:e.code})," – ",r?e.name:e.city,(0,t.jsxs)("span",{className:"ms-1 text-[var(--brand-text-muted)]",children:["(",e.country,")"]})]})})]},`${e.code}-${a}`),L=0,F=[];for(let e of N){let t=e.airports?.length>0;F.push(P(e,L,!1,t)),L++,t&&e.airports.forEach((t,a)=>{let r=a===e.airports.length-1;F.push(P(t,L,!0,!1,r)),L++})}return(0,t.jsxs)("div",{className:"relative",ref:_,children:[(0,t.jsxs)("div",{className:`form-input relative overflow-hidden rounded-md px-3 pe-8 pt-1.5 pb-2 ${f?"border-red-500":""}`,children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(x,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[p&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:p}),(0,t.jsx)("input",{ref:A,type:"text",className:"block h-5 w-full bg-transparent text-sm leading-5 outline-none placeholder:text-[var(--brand-text-muted)]",placeholder:u,value:y,onChange:e=>{R.current=!0,j(e.target.value),e.target.value||c(null)},onFocus:()=>{R.current=!0,y&&j("")},onKeyDown:e=>{w&&0!==O.length&&("ArrowDown"===e.key?(e.preventDefault(),T(e=>Math.min(e+1,O.length-1))):"ArrowUp"===e.key?(e.preventDefault(),T(e=>Math.max(e-1,0))):"Enter"===e.key&&D>=0?(e.preventDefault(),U(O[D])):"Escape"===e.key&&E(!1))},autoComplete:"off"})]})]}),y&&!S&&(0,t.jsx)("button",{type:"button",onClick:()=>{j(""),c(null),k([]),E(!1)},className:"absolute end-4 top-1/2 -translate-y-1/2 rounded-full p-0.5 text-[var(--brand-text-muted)] hover:text-[var(--brand-text)]",children:(0,t.jsx)(o.X,{className:"h-4 w-4"})}),S&&(0,t.jsx)("div",{className:"absolute end-4 top-1/2 -translate-y-1/2",children:(0,t.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-[var(--brand-surface)] border-t-[var(--brand-primary)]"})})]}),w&&F.length>0&&(0,t.jsx)("ul",{className:"autocomplete-dropdown absolute left-0 top-full z-50 mt-1 max-h-72 w-full overflow-y-auto rounded-lg md:min-w-105",children:F}),f&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:f})]})}])},9961,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(1851),n=e.i(47697),s=e.i(18566),l=e.i(48148),i=e.i(10688),o=e.i(20415),c=e.i(27166),d=e.i(9699),u=e.i(56902);let m=a.useLayoutEffect;e.s(["default",0,function({value:e,onChange:h,onDone:p,triggerRef:x,placeholder:f,label:v,error:g,minDate:b,maxDate:y,disabledRanges:j=[],navMinDate:N,navMaxDate:k,variant:w,dayPrice:E,priceLegend:S}){let C="prompt"===w,{lang:D}=(0,s.useParams)(),T=(0,l.useTranslations)(),[M,_]=(0,a.useState)(!1),[A,R]=(0,a.useState)(!1),[O,U]=(0,a.useState)(!1),P=(0,a.useRef)(null),L=(0,a.useRef)(null),F=(o.languageConfig[D]||o.languageConfig.en).dateFormat||"MM/dd/yyyy";(0,a.useEffect)(()=>{let e=window.matchMedia("(max-width: 767px)");R(e.matches);let t=e=>R(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,a.useEffect)(()=>
1{if(M)return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)};function e(e){P.current&&!P.current.contains(e.target)&&_(!1)}function t(e){"Escape"===e.key&&_(!1)}},[M]),m(()=>{if(!M)return void U(!1);let e=P.current,t=L.current;if(!e||!t)return;let a=e.getBoundingClientRect(),r=t.offsetWidth,n=a.left+r+8>window.innerWidth,s=a.right-r>=8;U(n&&s)},[M,A]);let I=b||(0,i.getMinDepartureDate)(),z=y||(0,i.getMaxDepartureDate)(),H=[{before:I},{after:z},...j],$=N||I,B=k||z,K=e&&e>=I&&e<=z?e:I;return(0,t.jsxs)("div",{ref:P,className:(0,c.cn)("relative",M&&"z-50"),children:[(0,t.jsx)("button",{ref:x,type:"button",onClick:()=>_(e=>!e),className:(0,c.cn)("form-input flex w-full cursor-pointer flex-col overflow-hidden rounded-md",C?"px-3 py-2.5 text-center":"px-3 pt-1.5 pb-2 text-start",g&&"border-red-500!"),children:(0,t.jsxs)("span",{className:(0,c.cn)("flex items-center gap-2",C&&"justify-center"),children:[!C&&(0,t.jsx)(n.CalendarIcon,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:(0,c.cn)("flex min-w-0 flex-col",!C&&"flex-1"),children:[v&&(!C||e)&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:v}),(0,t.jsx)("span",{className:(0,c.cn)("truncate whitespace-nowrap text-sm",C?"font-semibold text-[var(--brand-text)]":"text-[var(--brand-text-muted)]"),children:e?(0,r.format)(e,F):f||T("CHECKIN")})]}),C&&(0,t.jsx)(n.CalendarIcon,{size:20,className:"shrink-0 text-[var(--brand-text-muted)]"})]})}),M&&(0,t.jsxs)("div",{ref:L,className:(0,c.cn)("autocomplete-dropdown absolute top-full z-50 mt-1 p-3",O?"right-0":"left-0"),children:[(0,t.jsx)(d.Calendar,{mode:"single",selected:e,onSelect:e=>{e&&(h(e),_(!1),p&&p())},disabled:H,defaultMonth:K,startMonth:$,endMonth:B,numberOfMonths:A?1:2,showOutsideDays:!1,captionLayout:"label",dayPrice:E}),E&&S?(0,t.jsx)("p",{className:"mt-1 text-[11px] text-[var(--brand-text-muted)]",children:S}):null,(0,t.jsxs)("div",{className:"mt-2 flex items-center justify-between border-t border-[var(--border-color)] pt-2",children:[(0,t.jsx)("span",{className:"text-xs text-[var(--brand-text-muted)]",children:e?(0,r.format)(e,F):" "}),(0,t.jsx)(u.Button,{type:"button",variant:"brand",size:"sm",onClick:()=>{_(!1),p&&p()},className:"capitalize",children:T("BUTTON_DONE")})]})]}),g&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:g})]})}])},97921,41931,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(95727),n=e.i(1851),s=e.i(47697),l=e.i(18566),i=e.i(48148),o=e.i(10688),c=e.i(20415),d=e.i(27166),u=e.i(9699),m=e.i(56902);e.s(["default",0,function({startDate:e,endDate:h,onStartChange:p,onEndChange:x,onDone:f,triggerRef:v,label:g,error:b,startPlaceholder:y,endPlaceholder:j,allowSameDay:N=!1}){let{lang:k}=(0,l.useParams)(),w=(0,i.useTranslations)(),[E,S]=(0,a.useState)(!1),[C,D]=(0,a.useState)("checkin"),T=(0,a.useRef)(null),[M,_]=(0,a.useState)(!1),A=(c.languageConfig[k]||c.languageConfig.en).dateFormat||"MM/dd/yyyy",R=(0,o.getMinDepartureDate)(),O
1=(0,o.getMaxDepartureDate)();(0,a.useEffect)(()=>{let e=window.matchMedia("(max-width: 767px)");_(e.matches);let t=e=>_(e.matches);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,a.useEffect)(()=>{E&&D("checkin")},[E]),(0,a.useEffect)(()=>{if(E)return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)};function e(e){T.current&&!T.current.contains(e.target)&&S(!1)}function t(e){"Escape"===e.key&&S(!1)}},[E]);let U=e?{from:e,to:h||void 0}:void 0;return(0,t.jsxs)("div",{ref:T,className:(0,d.cn)("relative",E&&"z-50"),children:[(0,t.jsx)("button",{ref:v,type:"button",onClick:()=>S(e=>!e),className:(0,d.cn)("form-input flex w-full cursor-pointer flex-col overflow-hidden rounded-md px-3 pt-1.5 pb-2 text-start",b&&"border-red-500"),children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.CalendarIcon,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[g&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:g}),(0,t.jsxs)("span",{className:"flex items-center gap-2 whitespace-nowrap text-sm",children:[(0,t.jsx)("span",{className:(0,d.cn)("truncate text-[var(--brand-text-muted)]",!e&&"text-[var(--brand-text-muted)]"),children:e?(0,n.format)(e,A):y||w("CHECKIN")}),(0,t.jsx)("span",{className:"text-[var(--brand-text-muted)]",children:"—"}),(0,t.jsx)("span",{className:(0,d.cn)("truncate text-[var(--brand-text-muted)]",!h&&"text-[var(--brand-text-muted)]"),children:h?(0,n.format)(h,A):j||w("CHECKOUT")})]})]})]})}),E&&(0,t.jsxs)("div",{className:"autocomplete-dropdown absolute left-0 top-full z-50 mt-1 p-3",children:[(0,t.jsx)("p",{className:"mb-2 text-center text-xs font-medium text-[var(--brand-text-muted)]",children:"checkin"===C?`← ${y||w("CHECKIN")}`:`${j||w("CHECKOUT")} →`}),(0,t.jsx)(u.Calendar,{mode:"range",selected:U,onSelect:()=>{},onDayClick:function(t){"checkout"===C&&e&&(N?t.getTime()>=e.getTime():t.getTime()>e.getTime())?(x(t),D("checkin")):(p(t),x(N?t:(0,r.addDays)(t,3)),D("checkout"))},disabled:{before:R,after:O},defaultMonth:e||R,startMonth:R,endMonth:O,numberOfMonths:M?1:2,showOutsideDays:!1,captionLayout:"label"}),(0,t.jsxs)("div",{className:"mt-2 flex items-center justify-between border-t border-[var(--border-color)] pt-2",children:[(0,t.jsx)("span",{className:"text-xs text-[var(--brand-text-muted)]",children:e&&h?`${(0,n.format)(e,A)} — ${(0,n.format)(h,A)}`:" "}),(0,t.jsx)(m.Button,{type:"button",variant:"brand",size:"sm",onClick:()=>{S(!1),f&&f()},className:"capitalize",children:w("BUTTON_DONE")})]})]}),b&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:b})]})}],97921);var h=e.i(85176),p=e.i(67414),x=e.i(7233),f=e.i(99023),v=e.i(61911);e.s(["default",0,function({rooms:e,onChange:a,label:r}){let n=(0,i.useTranslations)(),s=e.reduce((e,t)=>e+t.adults,0),l=e.reduce((e,t)=>e+t.children,0);function o(t,r,n){a(e.map((e,a)=>{if(a!==t)return e;let s={...e,[r]:n};if("children"===r){let t=[...e.childAges||[]];for(;t.length<n;)t.push(5);s.childAges=t.slice(0,n)}return s}))}function c(){e.length>=h.MAX_ROOMS||a([...e,{adults:2,children:0,childAges:[]}])}let d=(0,t.jsx)("button",{type:"button",className:"form-input flex w-full flex-col overflow-hidden rounded-md px-3 pt-1.5 pb-2 text-start",children:(0,t.jsxs)("span",{className:"flex w-full items-center gap-2",children:[(0,t.jsx)(v.Users,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[r&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:r}),(0,t.jsxs)("span",{className:"truncate text-sm text-[var(--brand-text-muted)]",children:[s," ",n("PASSENGERS_ADULTS"),", ",l," ",n("CHILDS")]})]}),(0,t.jsx)("svg",{className:"h-4 w-4 shrink-0 text-[var(--brand-text-muted)]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]})});return(0,t.jsx)(p.default,{trigger:d,children:r=>(0,t.jsxs)("div",{className:"max-h-120 space-y-4 overflow-y-auto p-4",children:[e.map((r,s)=>(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"text-sm font-medium",children:[n("ROOM_INDEX")," ",s+1]}),e.length>1&&(0,t.jsx)(m.Button,{type:"button",variant:"link",size:"sm",onClick:()=>{!(e.length<=1)&&a(e.filter((e,t)=>
1t!==s))},className:"text-blue-500 no-underline hover:underline",children:n("BUTTON_REMOVE")})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-md",children:n("PASSENGERS_ADULTS")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Button,{type:"button",variant:"outline",size:"icon-lg",className:"rounded-full",onClick:()=>o(s,"adults",Math.max(1,r.adults-1)),disabled:r.adults<=1,children:(0,t.jsx)(f.Minus,{})}),(0,t.jsx)("span",{className:"w-6 text-center text-sm",children:r.adults}),(0,t.jsx)(m.Button,{type:"button",variant:"outline",size:"icon-lg",className:"rounded-full",onClick:()=>o(s,"adults",Math.min(6,r.adults+1)),disabled:r.adults>=6,children:(0,t.jsx)(x.Plus,{})})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-md",children:n("PASSENGERS_CHILDREN")}),(0,t.jsx)("p",{className:"text-xs text-[var(--brand-text-muted)]",children:n("CHILDREN_AGES_RANGE")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(m.Button,{type:"button",variant:"outline",size:"icon-lg",className:"rounded-full",onClick:()=>o(s,"children",Math.max(0,r.children-1)),disabled:r.children<=0,children:(0,t.jsx)(f.Minus,{})}),(0,t.jsx)("span",{className:"w-6 text-center text-sm",children:r.children}),(0,t.jsx)(m.Button,{type:"button",variant:"outline",size:"icon-lg",className:"rounded-full",onClick:()=>o(s,"children",Math.min(4,r.children+1)),disabled:r.children>=4,children:(0,t.jsx)(x.Plus,{})})]})]}),r.children>0&&(0,t.jsx)("div",{className:"space-y-1 ps-2",children:Array.from({length:r.children}).map((l,i)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"shrink-0 text-md text-[var(--brand-text-muted)]",children:[n("AGE")," ",i+1]}),(0,t.jsx)("select",{className:"form-input w-full rounded px-2 py-1 text-xs",value:r.childAges?.[i]||5,onChange:t=>{var r;return r=t.target.value,void a(e.map((e,t)=>{if(t!==s)return e;let a=[...e.childAges||[]];return a[i]=parseInt(r,10),{...e,childAges:a}}))},children:Array.from({length:18},(e,a)=>(0,t.jsx)("option",{value:a,children:a},a))})]},i))})]},s)),e.length<h.MAX_ROOMS&&(0,t.jsxs)(m.Button,{type:"button",variant:"outline",onClick:c,className:"w-full border-dashed text-[var(--brand-primary)]",children:["+ ",n("BUTTON_ADD_ROOM")]}),(0,t.jsx)("div",{className:"mt-2 flex justify-end border-t border-[var(--border-color)] pt-2",children:(0,t.jsx)(m.Button,{type:"button",variant:"brand",size:"sm",onClick:r,className:"capitalize",children:n("BUTTON_DONE")})})]})})}],41931)},96987,e=>{"use strict";var t=e.i(43476),a=e.i(99602),r=e.i(15505);e.s(["default",0,function({onSwap:e,horizontal:n}){return(0,t.jsx)("button",{type:"button",onClick:e,className:"swap-btn flex h-10 w-10 items-center justify-center rounded-full border border-[var(--border-color)] bg-[var(--bg-body)] text-[var(--brand-text-muted)] transition-colors hover:bg-[var(--brand-surface)] hover:text-[var(--brand-primary)] md:h-8 md:w-8","aria-label":"Swap origin and destination",children:n?(0,t.jsx)(r.ArrowLeftRight,{size:18}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.ArrowUpDown,{size:20,className:"md:hidden"}),(0,t.jsx)(r.ArrowLeftRight,{size:16,className:"hidden md:block"})]})})}])},34712,e=>{"use strict";var t=e.i(43476),a=e.i(3116);e.s(["default",0,function({value:e,onChange:r,label:n,icon:s=a.Clock,error:l}){let i=[];for(let e=0;e<24;e++)for(let t=0;t<60;t+=30){let a=String(e).padStart(2,"0"),r=String(t).padStart(2,"0");i.push(`${a}:${r}`)}return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:`form-input overflow-hidden rounded-md px-3 pt-1.5 pb-2 ${l?"border-red-500":""}`,children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(s,{size:22,className:"shrink-0 text-[var(--brand-text-muted)]"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[n&&(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--brand-text-muted)]",children:n}),(0,t.jsx)("select",{className:"h-5 w-full bg-transparent text-sm leading-5 outline-none",value:e||"10:00",onChange:e=>r(e.target.value),children:i.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]})}),l&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:l})]})}])},67414,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(7670);e.s(["default",0,function({trigger:e,children:n,align:s="left",className:l}){let[i,o]=(0,a.useState)(!1),c=(0,a.useRef)(null);return(0,a.useEffect)(()=>{function e(e){!c.current||c.current.contains(e.target)||e.target.closest("[data-radix-popper-content-wrapper]")||o(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:(0,r.default)("relative",l),ref:c,children:[(0,t.jsx)("div",{onClick:()=>o(!i),children:e}),i&&(0,t.jsx)("div",{className:(0,r.default)("autocomplete-dropdown absolute top-full z-50 mt-1 left-0 right-0 sm:min-w-90 rounded-lg","right"===s?"sm:left-auto sm:right-0":"sm:right-auto sm:left-0"),onClick:e=>e.stopPropagation(),children:"function"==typeof n?n(()=>o(!1)):n})]})}])},39144,e=>{"use strict";e.s(["cabins",0,{Y:{code:"Y",labelKey:"ECONOMY_CLASS",name:"Economy"},W:{code:"W",labelKey:"PREMIUM_ECONOMY_CLASS",name:"Premium Economy"}
1,C:{code:"C",labelKey:"BUSINESS_CLASS",name:"Business"},F:{code:"F",labelKey:"FIRST_CLASS",name:"First"}},"defaultCabin",0,"Y"])},20415,e=>{"use strict";let t={en:{name:"English",nativeName:"English",flag:"us",dir:"ltr",dateFormat:"MM/dd/yyyy",distanceUnit:"mi"},es:{name:"Spanish",nativeName:"Español",flag:"es",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},fr:{name:"French",nativeName:"Français",flag:"fr",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},de:{name:"German",nativeName:"Deutsch",flag:"de",dir:"ltr",dateFormat:"dd.MM.yyyy",distanceUnit:"km"},it:{name:"Italian",nativeName:"Italiano",flag:"it",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},br:{name:"Portuguese",nativeName:"Português",flag:"br",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},dk:{name:"Danish",nativeName:"Dansk",flag:"dk",dir:"ltr",dateFormat:"dd-MM-yyyy",distanceUnit:"km"},fi:{name:"Finnish",nativeName:"Suomi",flag:"fi",dir:"ltr",dateFormat:"dd.MM.yyyy",distanceUnit:"km"},hu:{name:"Hungarian",nativeName:"Magyar",flag:"hu",dir:"ltr",dateFormat:"yyyy.MM.dd",distanceUnit:"km"},is:{name:"Icelandic",nativeName:"Íslenska",flag:"is",dir:"ltr",dateFormat:"dd.MM.yyyy",distanceUnit:"km"},no:{name:"Norwegian",nativeName:"Norsk",flag:"no",dir:"ltr",dateFormat:"dd.MM.yyyy",distanceUnit:"km"},se:{name:"Swedish",nativeName:"Svenska",flag:"se",dir:"ltr",dateFormat:"yyyy-MM-dd",distanceUnit:"km"},zh:{name:"Chinese",nativeName:"中文",flag:"cn",dir:"ltr",dateFormat:"yyyy/MM/dd",distanceUnit:"km"},he:{name:"Hebrew",nativeName:"עברית",flag:"il",dir:"rtl",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},hi:{name:"Hindi",nativeName:"हिन्दी",flag:"in",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},mx:{name:"Spanish (Mexico)",nativeName:"Español (MX)",flag:"mx",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},co:{name:"Spanish (Colombia)",nativeName:"Español (CO)",flag:"co",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},il:{name:"Hebrew (Israel)",nativeName:"עברית",flag:"il",dir:"rtl",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},ca:{name:"English (Canada)",nativeName:"English (CA)",flag:"ca",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},au:{name:"English (Australia)",nativeName:"English (AU)",flag:"au",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},nz:{name:"English (New Zealand)",nativeName:"English (NZ)",flag:"nz",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},pl:{name:"Polish",nativeName:"Polski",flag:"pl",dir:"ltr",dateFormat:"dd.MM.yyyy",distanceUnit:"km"},pt:{name:"Portuguese (Portugal)",nativeName:"Português (PT)",flag:"pt",dir:"ltr",dateFormat:"dd/MM/yyyy",distanceUnit:"km"},cz:{name:"Czech",nativeName:"Čeština",flag:"cz",dir:"ltr",dateFormat:"dd.MM.yyyy",distanceUnit:"km"}};function a(e){return t[e]?.distanceUnit||"km"}e.s(["formatBaggageUnits",0,function(e,t,r,n,s){let l="imperial"==("mi"===a(s)?"imperial":"metric"),i=null!=e?String(e):"",o=t,c=r,d=n;return l?(t&&/cm/i.test(t)&&i&&(i=i.split("x").map(e=>Math.round(parseFloat(e)/2.54)).join("x"),o="in"),n&&/kg/i.test(n)&&r&&(c=Math.round(parseFloat(r)/.453592*10)/10,d="lbs")):(t&&/in/i.test(t)&&i&&(i=i.split("x").map(e=>Math.round(2.54*parseFloat(e))).join("x"),o="cm"),n&&/lb/i.test(n)&&r&&(c=Math.round(.453592*parseFloat(r)*10)/10,d="kg")),{dims:i,dimUnit:o,weight:c,weightUnit:d}},"formatDistance",0,function(e,t){return"mi"===a(t)?{value:Math.round(.621371*e*10)/10,unit:"mi"}:{value:Math.round(10*e)/10,unit:"km"}},"getDistanceThresholds",0,function(e){return"mi"===a(e)?[1,3,5,10,15].map(e=>({display:e,km:e/.621371,unit:"mi"})):[1,3,5,10,15].map(e=>({display:e,km:e,unit:"km"}))},"languageConfig",0,t,"locales",0,["en","es","fr","de","it","br","dk","fi","hu","is","no","se","zh","he","hi","mx","co","il","ca","au","nz","pl","pt","cz"]])},58639,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(39144),n=e.i(10688);let s="searchFormState",l=["departDate","returnDate","hotelCheckIn","hotelCheckOut","carPickupDate","carDropoffDate","transferDate","transferReturnDate"],i={origin:null,destination:null,departDate:null,returnDate:null,adults:1,children:0,infants:0,cabin:r.defaultCabin,tripType:"roundtrip",directOnly:!1,multiLegs:[],voucherCode:"",hotelDestination:null,hotelCheckIn:null,hotelCheckOut:null,hotelRooms:[{adults:2,children:0,childAges:[]}],carPickup:null,carDropoff:null,carPickupDate:null,carDropoffDate:null,carPickupTime:"10:00",carDropoffTime:"10:00",carSameLocation:!0,carDriverAge25:!0,carNationality:"US",transferFrom:null,transferTo:null,transferDate:null,transferTime:"10:00",transferPassengers:1,transferReturnDate:null,transferReturnTime:"10:00",transferSuitcases:1,transferTrip:"one"};function o(e){return e&&e.code&&!e.name?{...e,name:e.code}:e}function c(e,t){switch(t.type){case"SET_FIELD":return{...e,[t.field]:t.value};case"SET_FIELDS":return{...e,...t.fields};case"HYDRATE":return{...e,...t.state};case"RESET":return i;default:return e}}let d=(0,a.createContext)(null);e.s(["SearchProvider",0,function({children:e}){let[r,u]=(0,a.useReducer)(c,i),m=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{let e=function(){try{let e=sessionStorage.getItem(s);if(!e)return null;return{...i,...function(e){let t=JSON.parse(e);for(let e of l)t[e]&&"string"==typeof t[e]&&(t[e]=(0,n.parseLocalDate)(t[e]));return t.origin=o(t.origin),t.destination=o(t.destination),Array.isArray(t.multiLegs)&&(t.multiLegs=t.multiLegs.map(e=>({...e,origin:o(e.origin),destination:o(e.destination),date:e.date?(0,n.parseLocalDate)(e.date):null}))),t}(e)}}catch{return null}}();e&&u({type:"HYDRATE",state:e}),m.current=!0},[]),(0,a.useEffect)(()=>{m.current&&function(e){try{sessionStorage.setItem(s,function(e){let t={};for(let[a,r]of Object.entries(e))r instanceof Date?t[a]=(0,n.formatDateForApi)(r):"multiLegs"===a&&Array.isArray(r)?t[a]=r.map(e=>({...e,date:e.date instanceof Date?(0,n.formatDateForApi)(e.date):e.date})):t[a]=r;return JSON.stringify(t)}(e))}catch{}}(r)},[r]),(0,t.jsx)(d.Provider,{value:{...r,setField:(e,t)=>u({type:"SET_FIELD",field:e,value:t}),setFields:e=>u({type:"SET_FIELDS",fields:e}),reset:()=>{u({type:"RESET"});try{sessionStorage.removeItem(s)}catch{}}},children:e})},"useSearch",0,function(){let e=(0,a.useContext)(d);if(!e)throw Error("useSearch must be used within SearchProvider");return e}])},89979,e=>{"use strict";var t=e.i(71645);e.s(["useDebounce",0,function(e,a=300){let[r,n]=(0,t.useState)(e);return(0,t.useEffect)(()=>{let t=setTimeout(()=>n(e),a);return()=>clearTimeout(t)},[e,a]),r}])},67418,e=>{"use strict";var t=e.i(71645);let a={flight:null,hotel:null},r=null,n={alliance:"ARN - alliance",travelandleisure:"ARN Resort - travelandleisure",gimmonix:"Gimmonix"};async function s(){return a.flight&&a.hotel?a:r||(r=Promise.all([fetch("https://affiliateapi.militaryfares.com/front/services.php").then(e=>e.ok?e.json():[]).catch(()=>[]),fetch("https://gimmonixapi.militaryfares.com/services.php").then(e=>e.ok?e.json():[]).catch(()=>[])]).then(([e,t])=>(a.flight=Array.isArray(e)?e:[],a.hotel=Array.isArray(t)?t:[],r=null,a)))}e.s(["getHotelServiceLabel",0,function(e){return n[e]||e},"useDebugServices",0,function(e){let[r,n]=(0,t.useState)({flight:a.flight||[],hotel:a.hotel||[]});return(0,t.useEffect)(()=>
1{if(!e)return;let t=!1;return s().then(e=>{t||n({flight:e.flight,hotel:e.hotel})}),()=>{t=!0}},[e]),r}])},31254,e=>{"use strict";var t=e.i(71645),a=e.i(85176),r=e.i(10688);let n="recentSearches";e.s(["useRecentSearches",0,function(){let[e,s]=(0,t.useState)([]),[l,i]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{try{let e=localStorage.getItem(n);if(e){let t,a=JSON.parse(e),l=((t=new Date).setHours(0,0,0,0),a.filter(e=>{let a="hotel"===e.type?e.checkIn:"car"===e.type?e.pickupDate:"transfer"===e.type?e.date:"flight"===e.type&&"multi"===e.tripType&&e.legs?.[0]?.date||e.departDate;if(!a)return!0;let n=(0,r.parseLocalDate)(a);return!n||n>=t}));s(l),l.length!==a.length&&localStorage.setItem(n,JSON.stringify(l))}}catch{}i(!0)},[]),{searches:e,addSearch:(0,t.useCallback)(e=>{s(t=>{let r=t.filter(t=>t.type!==e.type||("hotel"===t.type?(t.destination?.geoId||t.destination?.name)!==(e.destination?.geoId||e.destination?.name)||t.checkIn!==e.checkIn||t.checkOut!==e.checkOut:"package"===t.type?t.origin?.code!==e.origin?.code||t.city!==e.city||t.departDate!==e.departDate||t.returnDate!==e.returnDate:"car"===t.type?(t.pickup?.station||t.pickup?.code)!==(e.pickup?.station||e.pickup?.code)||t.pickupDate!==e.pickupDate||t.dropoffDate!==e.dropoffDate:"transfer"===t.type?(t.from?.name||t.from?.code)!==(e.from?.name||e.from?.code)||(t.to?.name||t.to?.code)!==(e.to?.name||e.to?.code)||t.date!==e.date:"flight"===t.type&&"multi"===t.tripType?t.legs?.[0]?.origin?.code!==e.legs?.[0]?.origin?.code||t.legs?.[0]?.destination?.code!==e.legs?.[0]?.destination?.code||t.legs?.[0]?.date!==e.legs?.[0]?.date:t.origin?.code!==e.origin?.code||t.destination?.code!==e.destination?.code||t.departDate!==e.departDate||t.returnDate!==e.returnDate)),s=[{...e,timestamp:Date.now()},...r].slice(0,a.MAX_RECENT_SEARCHES);try{localStorage.setItem(n,JSON.stringify(s))}catch{}return s})},[]),clearSearches:(0,t.useCallback)(()=>{s([]);try{localStorage.removeItem(n)}catch{}},[]),ready:l}}])},76668,e=>{"use strict";let t="tabunder",a="popover",r=RegExp("^/(?:[a-z]{2}(?:/[a-z]{3})?/?)?$"),n=["/","/search-hotel","/hotel/","/book-hotel","/confirmation"],s=null,l=0;function i(){return!!s&&Date.now()-l<1500}let o=0,c=()=>null;e.s(["DEFAULT_IGNORE_TO",0,[".form-input",".form-input *",".autocomplete-dropdown",".autocomplete-dropdown *","input","select","textarea","label","form",'[role="dialog"]','[role="dialog"] *',"header","header *","footer","footer *","[data-no-popunder]","[data-no-popunder] *"],"DEFAULT_PATHS",0,n,"PATH_HOME",0,"/","POP_GLOBAL",0,"TssGeoKit","POP_MODE_OVER",0,a,"POP_MODE_TAB_UNDER",0,t,"POP_PREFIX",0,"tsg","POP_SRC",0,"/assets/shared/js/geo-widget.v1.js","hasFreshTabUnderDestination",0,i,"navigateUnlessAdTookTab",0,function(e){if(!function(e=2e3){return o>0&&Date.now()-o<e}()){window.location.href=e;return}let t=window.location.href;setTimeout(()=>{window.location.href===t&&(window.location.href=e)},1500)},"noteAdTookTab",0,function(){o=Date.now()},"onAdPath",0,function(e,t=n){let a=String(e||"");return t.some(e=>"/"===e?r.test(a):a.includes(e))},"peekTabUnderDestination",0,function(){return i()?s:null},"popExpires",0,function(e,a){return e!==t||a?a:1800},"popPlacement",0,function(e){return e===t?{under:!0,tab:!0}:{under:!0,tab:!1}},"popWindowGeometry",0,function(e={}){let t=e.windowWidth??900,a=e.windowHeight??700,r=window.screen?.availWidth||1440,n=window.screen?.availHeight||900;return{width:t,height:a,left:e.windowLeft??Math.max(0,Math.round((r-t)/2)),top:e.windowTop??Math.max(0,Math.round((n-a)/2))}},"popoverConfig",0,function(e){return e!==a?null:{allowPopUnderTrick:!1,fallback:{under:!1,tab:!1}}},"resolvePopUrl",0,function(){try{return c()||null}catch{return null}},"resolveTabUnderUrl",0,function(e){try{if(i())return new URL(s,window.location.href).href}catch{}return e||window.location.href},"setPopUrlResolver",0,function(e){c="function"==typeof e?e:()=>null},"setTabUnderDestination",0,function(e){s="string"==typeof e&&e?e:null,l=Date.now()}])}]);

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.