PageSourceSearch

https://cdn2.pickyourtrail.com/images/assets/veho-web-next/2609242…/static/chunks/759.9055742cb12fb55c.js

js pickyourtrail.com collected 2026-09-24 09:35:59 UTC 14,519 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[759],{30454:(e,t,r)=>{r.d(t,{l:()=>s});var a=r(59475),l=r(18730);let i=async(e,t,r)=>await t({url:"flight/updateflight",method:"POST",body:e,signal:r}),s=e=>{let t=(0,a.useFetcher)(),{mutate:r,mutateAsync:s,...n}=(0,l.useMutation)(e=>i(e,t,void 0),e);return{alternateSelectedFlight:r,alternateSelectedFlightAsync:s,...n}}},18152:(e,t,r)=>{r.d(t,{H:()=>s});var a=r(59475),l=r(18730);let i=async(e,t)=>await e({url:"user/getUserDetails",method:"GET",signal:t}),s=e=>{let t=(0,a.useFetcher)(),{mutate:r,mutateAsync:s,...n}=(0,l.useMutation)(()=>i(t,void 0),e);return{getUserDetails:r,getUserDetailsAsync:s,...n}}},21202:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(95155);r(12115);var l=r(68376),i=r(83153),s=r(90413);let n=e=>{let{isOpen:t,onClose:r,onProceed:n,title:o="Change in landing date",description:d="This option shifts your landing date. We'll have to re-check the resort availability and other prices for the new dates. This might take a while, sit tight.",secondaryButtonText:u="No, Don't change my flight",primaryButtonText:c="Ok, Continue"}=e;return(0,a.jsx)(s.Dialog,{open:t,onOpenChange:r,children:(0,a.jsx)(s.DialogContent,{className:"max-w-lg h-auto p-6",children:(0,a.jsxs)(l.VP,{className:"gap-6",children:[(0,a.jsxs)(s.DialogHeader,{className:"text-center space-y-4",children:[(0,a.jsx)(s.DialogTitle,{className:"text-center",children:(0,a.jsx)(i.Typography,{className:"font-bold text-2xl",children:o})}),(0,a.jsx)(s.DialogDescription,{className:"text-center",children:(0,a.jsx)(i.Typography,{className:"text-base text-muted-foreground leading-relaxed",children:d})})]}),(0,a.jsxs)(l.fI,{className:"gap-3 mt-2",children:[(0,a.jsx)(i.Button,{variant:"outline",onClick:r,className:"flex-1",children:u}),(0,a.jsx)(i.Button,{onClick:n,className:"flex-1",children:c})]})]})})})}},50759:(e,t,r)=>{r.r(t),r.d(t,{default:()=>z});var a=r(95155),l=r(12115),i=r(94928),s=r(59953),n=r.n(s),o=r(76046),d=r(30454),u=r(68376),c=r(18348),h=r(30810),v=r(55286),g=r(44549),m=r(77980),x=r(11864),f=r(66261),p=r(32141),y=r(66889),j=r(98867),w=r(40767),b=r(82310),N=r(72437),C=r(18152),T=r(83153),A=r(65868),k=r(62570),I=r(81247),M=r(25571);let O=function(){var e,t,r,a,l,i,s,n;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!o||0===o.length)return{isOneway:!1,onward:null,return:null};let d=1===o.length,u=o[0],c=o[o.length-1],h="".concat((null==u?void 0:null===(t=u.routes)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.depMonth)||""," ").concat((null==u?void 0:null===(a=u.routes)||void 0===a?void 0:null===(r=a[0])||void 0===r?void 0:r.depDateOfMonth)||"").trim(),v=(null==u?void 0:u.landSameDay)?"Arr. same day":"",g=null;if(!d&&(null==c?void 0:c.routes)){let e=c.routes.length-1;g={date:"".concat((null==c?void 0:null===(i=c.routes)||void 0===i?void 0:null===(l=i[e])||void 0===l?void 0:l.arrMonth)||""," ").concat((null==c?void 0:null===(n=c.routes)||void 0===n?void 0:null===(s=n[e])||void 0===s?void 0:s.arrDateOfMonth)||"").trim(),arrivalText:(null==c?void 0:c.landSameDay)?"Arr. same day":"Arr. next day"}}return{isOneway:d,onward:{date:h,arrivalText:v},return:g}},E=e=>{var t,r,i,s;let{trips:n,flightCosting:o,alternatePageUrl:d,addToItinerary:c,isLoading:h=!1}=e,v=O(n),{data:g}=(0,C.H)(),m=(0,l.useMemo)(()=>{var e;return(0,M.Y)({key:I.kv,permissions:null==g?void 0:null===(e=g.data)||void 0===e?void 0:e.permissions})||!1},[null==g?void 0:null===(t=g.data)||void 0===t?void 0:t.permissions]),E=null==o?void 0:o.diff,P=null,S=!1,D=!0,B=!1;m?(P=(null==o?void 0:o.publishedCost)||null,D=!0):E&&"object"==typeof E&&void 0!==E.diffCost&&null!==E.diffCost?(P=E.diffCost||0,S="PRICEINCREASE"===E.diffChangeType,D=!1,B=0===P):(P=(null==o?void 0:o.publishedCost)||null,D=!0);let R=null!==P?B?"At same price":function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INR";return e.toLocaleString("en-US",{style:"currency",currency:t}).split(".")[0]}(P,"INR"):null;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(T.Card,{className:"hidden lg:block bg-white border border-border rounded-2xl p-4 shadow-sm",children:[(0,a.jsxs)(u.fI,{className:"items-center gap-2 justify-end",children:[null!==P&&(0,a.jsx)(a.Fragment,{children:B?(0,a.jsx)(k.o,{className:"text-lg font-semibold text-gray-700",children:"At same price"}):(0,a.jsxs)(u.fI,{className:"items-center gap-1.5",children:[!D&&(S?(0,a.jsx)(x.A,{className:"w-4 h-4 text-destructive"}):(0,a.jsx)(f.A,{className:"w-4 h-4 text-primary-600"})),(0,a.jsx)(k.o,{className:"text-xl font-bold ".concat(D?"text-gray-900":S?"text-destructive":"text-primary-600"),children:R})]})}),(0,a.jsx)(T.Button,{variant:"default",size:"sm",className:"bg-gradient-to-r from-green-600 to-green-700 hover:from-green-700 hover:to-green-800 text-white shadow-md transition-all duration-300 hover:shadow-lg hover:scale-105 active:scale-95 flex items-center gap-1 disabled:opacity-50 disabled:cursor-not-allowed",onClick:c,disabled:h,children:"Add to Itinerary"})]}),d&&(0,a.jsx)(k.o,{onClick:d,className:"text-blue-600 hover:text-blue-700 text-sm font-semibold transition-all duration-300 cursor-pointer text-right mb-4 hover:scale-105 hover:underline active:scale-95",children:"View more flights"}
1),(0,a.jsxs)(u.az,{className:"grid ".concat(v.isOneway?"grid-cols-1":"grid-cols-2"," gap-8"),children:[(0,a.jsxs)(u.VP,{className:"space-y-1 gap-0",children:[(0,a.jsxs)(u.fI,{className:"items-center gap-1.5 text-muted-foreground text-xs",children:[(0,a.jsx)(p.A,{className:"w-3.5 h-3.5"}),(0,a.jsx)(k.o,{className:"text-xs text-muted-foreground",children:v.isOneway?"Oneway":"Onward"})]}),(0,a.jsx)(k.o,{className:"text-lg font-bold text-foreground",children:(null===(r=v.onward)||void 0===r?void 0:r.date)||"N/A"}),(null===(i=v.onward)||void 0===i?void 0:i.arrivalText)&&(0,a.jsxs)(u.fI,{className:"items-center gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(y.A,{className:"w-3 h-3"}),(0,a.jsx)(k.o,{className:"text-xs text-muted-foreground",children:v.onward.arrivalText})]})]}),!v.isOneway&&v.return&&(0,a.jsxs)(u.VP,{className:"space-y-1 text-right gap-0",children:[(0,a.jsxs)(u.fI,{className:"items-center justify-end gap-1.5 text-muted-foreground text-xs",children:[(0,a.jsx)(p.A,{className:"w-3.5 h-3.5 rotate-180"}),(0,a.jsx)(k.o,{className:"text-xs text-muted-foreground",children:"Return"})]}),(0,a.jsx)(k.o,{className:"text-lg font-bold text-foreground",children:v.return.date||"N/A"}),(0,a.jsxs)(u.fI,{className:"items-center justify-end gap-1 text-xs text-muted-foreground",children:[(0,a.jsx)(y.A,{className:"w-3 h-3"}),(0,a.jsx)(k.o,{className:"text-xs text-muted-foreground",children:v.return.arrivalText})]})]})]}),(0,a.jsx)(u.az,{className:"my-4 border-t border-gray-200"}),(0,a.jsxs)(u.az,{className:"grid grid-cols-2 gap-x-4 gap-y-2",children:[(0,a.jsxs)(A.E,{variant:"secondary",className:"flex items-center gap-1 rounded-full px-3 py-1 text-xs font-medium w-fit ".concat((null==o?void 0:o.refundable)?"bg-green-100 text-green-700 border border-green-200":"bg-red-100 text-red-700 border border-red-200"),children:[(null==o?void 0:o.refundable)?(0,a.jsx)(j.A,{className:"w-3 h-3"}):(0,a.jsx)(w.A,{className:"w-3 h-3"}),(null==o?void 0:o.refundable)?"Refundable":"Non Refundable"]}),(0,a.jsxs)(A.E,{variant:"outline",className:"flex items-center gap-1 bg-white border-gray-300 text-gray-700 rounded-full px-3 py-1 text-xs font-medium w-fit",children:[(0,a.jsx)(b.A,{className:"w-3 h-3"}),(null==o?void 0:null===(s=o.flightClass)||void 0===s?void 0:s.toUpperCase())||"ECONOMY"]}),(0,a.jsxs)(A.E,{variant:"outline",className:"flex items-center gap-1 bg-indigo-50 border-indigo-200 text-indigo-700 rounded-full px-3 py-1 text-xs font-medium w-fit col-span-2",children:[(0,a.jsx)(N.A,{className:"w-3 h-3"}),v.isOneway?"ONEWAY FARE":"RETURN FARE"]})]})]}),(0,a.jsx)(u.az,{className:"lg:hidden fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 p-4 shadow-lg z-50",children:(0,a.jsx)(T.Button,{variant:"default",className:"bg-gradient-to-r from-green-600 to-green-700 hover:from-green-700 hover:to-green-800 text-white shadow-md transition-all duration-300 hover:shadow-lg hover:scale-105 active:scale-95 flex items-center justify-center gap-2 w-full disabled:opacity-50 disabled:cursor-not-allowed",onClick:c,disabled:h,children:"Add to Itinerary"})})]})};var P=r(28827),S=r(36354),D=r(85927),B=r(63122),R=r(21202),F=r(28284);let z=e=>{var t;let{configKey:r,regionCode:s,itineraryId:x,locale:f}=e,p=(0,o.useRouter)(),y=(0,o.useSearchParams)(),j=(0,i.md)(h.ay),{alternateSelectedFlightAsync:w}=(0,d.l)(),b=(0,i.md)(h.pX),N=(0,c.G)(x),[C,T]=(0,l.useState)(!1),[A,k]=(0,l.useState)(!1),[I,M]=(0,l.useState)(!1),O=y.get("flight-details"),z=(0,l.useMemo)(()=>"true"===O?"/flights/view/".concat(x):"/".concat(f,"/customize/").concat(s,"/view/").concat(x),[x,s,O,f]),V=(0,l.useMemo)(()=>r.indexOf("#")>-1?(0,m.A)(r):r,[r]),L=(0,l.useMemo)(()=>(0,g.A)(r),[r]),H=(0,l.useMemo)(()=>{var e;return(null==b?void 0:null===(e=b.flightCostings)||void 0===e?void 0:e.costingById[L])||void 0},[L,b]),U=(0,l.useMemo)(()=>(null==j?void 0:j.publishedCost)||0,[null==j?void 0:j.publishedCost]),Y=(0,l.useMemo)(()=>j?Object.values(j.trips):[],[j]),G=(0,l.useMemo)(()=>{var e,t;let r=(null==j?void 0:j.trips)||{},a={},l=[],i=[];Object.keys(r).forEach((e,t)=>{let s=r[e].routes,n=0;
1s.forEach((e,r)=>{var o,d,u;0===r?(a[0===t?"onwards":"returns"]={departure:e.departureAirportCode,departureTime:null===(o=e.departureTime)||void 0===o?void 0:o.split(":").slice(0,2).join(":"),arrival:"",arrivalTime:"",duration:n},0===t&&l.push(e.departureCity),1===t&&i.push(e.departureCity)):(a[0===t?"onwards":"returns"]={...a[0===t?"onwards":"returns"],arrival:e.arrivalAirportCode,arrivalTime:null===(d=e.arrivalTime)||void 0===d?void 0:d.split(":").slice(0,2).join(":"),duration:n},0===t&&l.push(e.arrivalCity),1===t&&i.push(e.arrivalCity)),n+=e.travelDuration,1===s.length&&(a[0===t?"onwards":"returns"].arrival=e.arrivalAirportCode,a[0===t?"onwards":"returns"].arrivalTime=null===(u=e.arrivalTime)||void 0===u?void 0:u.split(":").slice(0,2).join(":"))}),a[0===t?"onwards":"returns"]={...a[0===t?"onwards":"returns"],duration:n}});let s=(null===(e=a.onwards)||void 0===e?void 0:e.duration)||0,n=(null===(t=a.returns)||void 0===t?void 0:t.duration)||0;return{tripsList:a,onwardsCity:l,returnsCity:i,flightProps:{onwardHours:"".concat(Math.floor(s/60)," h"),onwardMins:"".concat(s%60," m"),returnHours:"".concat(Math.floor(n/60)," h"),returnMins:"".concat(n%60," m")}}},[j]),_=(0,l.useCallback)(()=>{let e;e="true"===O?"/flights/view/".concat(x,"/alternate-flights/").concat(V,"?flight-details=true"):"".concat(z,"/alternate-flights/").concat(V),p.push(e)},[z,V,p,O,x]),q=(0,l.useMemo)(()=>"true"===O?"/flights/itinerary/".concat(x):"/customize/".concat(s,"/view/").concat(x,"/inclusions"),[x,s,O]),Q=(0,l.useCallback)(async e=>{if(b&&H){M(!0);try{var t;let r=(0,v.P)(e,null==b?void 0:null===(t=b.itinerary)||void 0===t?void 0:t.itineraryId,L,H.costingId||"");sessionStorage.setItem("scrollPosition",window.scrollY.toString());let a=await w(r);N(a),p.push(q)}catch(e){console.error("Error selecting alternate flight:",e)}finally{M(!1)}}},[b,H,L,w,N,p,q]),W=(0,l.useCallback)(()=>{var e,t,r;if(!j)return;let a=null===(t=j.trips)||void 0===t?void 0:t[(null===(e=j.allTrips)||void 0===e?void 0:e[0])||""];j.transitVisaRequired&&(null===(r=j.transitVisaLayoverAirports)||void 0===r?void 0:r.length)?k(!0):(null==a?void 0:a.landSameDay)?Q(j):T(!0)},[j,Q]),X=(0,l.useCallback)(()=>{M(!0),j&&Q(j),T(!1)},[j,Q]);return((0,l.useEffect)(()=>{if(!j||n()(j)){let e=setTimeout(()=>{_()},2e3);return()=>clearTimeout(e)}},[j,_]),!j||n()(j))?(0,a.jsx)(P.A,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(F.M,{baseItineraryPath:z,configKey:V,trips:G,flightProps:G.flightProps,headerButtonAction:()=>{},setMobileFilter:()=>{},activeSort:"",sortOrder:"asc",pageTitle:"Flight Details",backButtonText:"Back to Itinerary",showSortButtons:!1,showFlightInfo:!0,showBackToListButton:!0,onBackToListClick:_,backToItinerary:q,totalCost:U}),(0,a.jsx)(u.az,{className:"bg-white py-6",children:(0,a.jsxs)(u.HD,{children:[(0,a.jsx)(B.A,{flightCosting:j}),(0,a.jsxs)(u.fI,{className:"grid grid-cols-1 lg:grid-cols-3 gap-3 md:gap-6 items-start",children:[(0,a.jsx)(D.A,{flightCosting:j}),(0,a.jsxs)(u.VP,{className:"space-y-3 md:space-y-4",children:[(0,a.jsx)(E,{flightCosting:j,trips:Y,alternatePageUrl:_,addToItinerary:W,totalCost:U,isLoading:I}),!n()(null==j?void 0:j.extraFacilities)&&(0,a.jsx)(S.K,{flightCostings:j})]})]})]})}),C&&(0,a.jsx)(R.A,{isOpen:C,onClose:()=>T(!1),onProceed:X,title:"Change in landing date",description:"This option shifts your landing date. We'll have to re-check the resort availability and other prices for the new dates. This might take a while, sit tight.",secondaryButtonText:"No, Don't change my flight",primaryButtonText:"Ok, Continue"}),A&&(0,a.jsx)(R.A,{isOpen:A,onClose:()=>k(!1),onProceed:X,title:"Transit Visa Required for Your Layover",description:"This flight includes a layover in ".concat(null==j?void 0:null===(t=j.transitVisaLayoverAirports)||void 0===t?void 0:t.join(", "),", where a transit visa may be required for Indian passport holders. Please confirm you have the necessary visa before continuing."),secondaryButtonText:"Go Back",primaryButtonText:"Continue Anyway"})]})}},18348:(e,t,r)=>{r.d(t,{G:()=>o});var a=r(12115),l=r(94928),i=r(18730),s=r(30810),n=r(89179);let o=e=>{let t=(0,l.Xr)(s.pX),r=(0,i.useQueryClient)();return(0,a.useCallback)(a=>{if("SUCCESS"===a.status&&a.data){let l={...a.data,iterCities:(0,n.A)(a.data)};t(l),r.setQueriesData(["itinerary-details",e],e=>e?{...e,...a,data:l}:{...a,data:l})}},[e,t,r])}},55286:(e,t,r)=>{r.d(t,{P:()=>a});let a=(e,t,r,a)=>{let l=e.identifier,i=[e.identifier],s=e.airlineCode,n=e.flightSearchQueries,o=e.sourceProvider,d=e.flightClass,u=(null==e?void 0:e.allTrips)||[],c=(null==e?void 0:e.trips)||{},h=null==u?void 0:u.length,v=null,g=null;if(h>0){var m,x,f,p,y;let e=(null===(m=c[u[0]])||void 0===m?void 0:m.routes)||[];if(e.length>0&&(v=(null===(x=e[e.length-1])||void 0===x?void 0:x.arrivalTime)||null),h>1){let e=(null===(f=c[u[1]])||void 0===f?void 0:f.routes)||[];e.length>0&&(g=(null===(p=e[0])||void 0===p?void 0:p.departureTime)||null)}else g=(null===(y=e[0])||void 0===y?void 0:y.departureTime)||null}return{selectedFlightIdentifier:l,tripIdentifiers:i,validatingAirline:s,sourceProvider:o,flightSearchQueries:n,flightClass:d,itineraryId:t,configKey:r,costingId:a,arrivalTime:v,departureTime:g}}}}]);

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.