1"use strict";(self.webpackChunklanding_page=self.webpackChunklanding_page||[]).push([[5937,8059],{270:(e,t,o)=>{o.d(t,{N:()=>u});var n=o(5043),a=o(7100),s=o(5989),r=o(7343);const i=new Set((0,a.X6)()),l=e=>{const t="string"===typeof e?e.replace(/[^a-zA-Z]/g,"").toUpperCase():"";return i.has(t)?t:null};let c=null;const d=async()=>{const e=l(s.A.get("country_code"));return e||(c||(c=(0,r.ow)().then(e=>{const t=l(null===e||void 0===e?void 0:e.country);return t?(s.A.set("ipAdress",e.ip),s.A.set("city",e.city),s.A.set("state",e.region),s.A.set("country",e.country_name),s.A.set("country_code",t),s.A.set("dialcode",e.country_calling_code),s.A.set("locationDetails",e),t):null}).catch(()=>null)),c)};function u(e){const[t,o]=(0,n.useState)(()=>l(s.A.get("country_code"))||null);return(0,n.useEffect)(()=>{if(t)return;let e=!1;return d().then(t=>{!e&&t&&o(t)}),()=>{e=!0}},[t]),console.log("hotel?.country",e),t||l(e)||"US"}},475:(e,t,o)=>{o.d(t,{Gl:()=>a});const n={AED:"\u062f.\u0625",AFN:"\u060b",ALL:"L",AMD:"\u058f",ANG:"\u0192",AOA:"Kz",ARS:"$",AUD:"$",AWG:"\u0192",AZN:"\u20bc",BAM:"KM",BBD:"$",BDT:"\u09f3",BGN:"\u043b\u0432",BHD:".\u062f.\u0628",BIF:"FBu",BMD:"$",BND:"$",BOB:"Bs.",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"Br",BZD:"$",CAD:"$",CDF:"FC",CHF:"CHF",CLP:"$",CNY:"\xa5",COP:"$",CRC:"\u20a1",CUP:"$",CVE:"$",CZK:"K\u010d",DJF:"Fdj",DKK:"kr",DOP:"$",DZD:"\u062f.\u062c",EGP:"\xa3",ERN:"Nfk",ETB:"Br",EUR:"\u20ac",FJD:"$",FKP:"\xa3",FOK:"kr",GBP:"\xa3",GEL:"\u20be",GGP:"\xa3",GHS:"\u20b5",GIP:"\xa3",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"\u20aa",IMP:"\xa3",INR:"\u20b9",IQD:"\u0639.\u062f",IRR:"\ufdfc",ISK:"kr",JEP:"\xa3",JMD:"$",JOD:"\u062f.\u0627",JPY:"\xa5",KES:"Sh",KGS:"\u0441",KHR:"\u17db",KID:"$",KMF:"CF",KRW:"\u20a9",KWD:"\u062f.\u0643",KYD:"$",KZT:"\u20b8",LAK:"\u20ad",LBP:"\u0644.\u0644",LKR:"Rs",LRD:"$",LSL:"L",LYD:"\u0644.\u062f",MAD:"\u062f.\u0645.",MDL:"L",MGA:"Ar",MKD:"\u0434\u0435\u043d",MMK:"K",MNT:"\u20ae",MOP:"P",MRU:"UM",MUR:"\u20a8",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"\u20a6",NIO:"C$",NOK:"kr",NPR:"\u20a8",NZD:"$",OMR:"\u0631.\u0639.",PAB:"B/.",PEN:"S/",PGK:"K",PHP:"\u20b1",PKR:"\u20a8",PLN:"z\u0142",PYG:"\u20b2",QAR:"QAR",RON:"lei",RSD:"\u0434\u0438\u043d",RUB:"\u20bd",RWF:"FRw",SAR:"\u0631.\u0633",SBD:"$",SCR:"\u20a8",SDG:"\xa3",SEK:"kr",SGD:"$",SHP:"\xa3",SLE:"Le",SLL:"Le",SOS:"Sh",SRD:"$",SSP:"\xa3",STN:"Db",SYP:"\xa3",SZL:"L",THB:"\u0e3f",TJS:"\u0405\u041c",TMT:"m",TND:"\u062f.\u062a",TOP:"T$",TRY:"\u20ba",TTD:"$",TVD:"$",TWD:"NT$",TZS:"Sh",UAH:"\u20b4",UGX:"Sh",USD:"$",UYU:"$",UZS:"\u0441\u045e\u043c",VES:"Bs.",VND:"\u20ab",VUV:"Vt",WST:"T",XAF:"FCFA",XCD:"$",XDR:"SDR",XOF:"CFA",XPF:"\u20a3",YER:"\ufdfc",ZAR:"R",ZMW:"ZK",ZWL:"$"},a=e=>"\u2068".concat(n[e]||e,"\u2069")},2213:e=>{var t="Invariant failed";e.exports=function(e,o){if(!e)throw new Error(t)}},3976:(e,t,o)=>{o.d(t,{Ak:()=>M,C8:()=>h,CN:()=>fe,DE:()=>C,EI:()=>se,Eh:()=>F,GO:()=>v,GR:()=>y,IB:()=>je,Jq:()=>Ae,Jy:()=>_,L3:()=>B,Lo:()=>S,MF:()=>V,MQ:()=>X,N7:()=>Z,O2:()=>$,P$:()=>ee,PG:()=>m,PH:()=>b,PU:()=>te,QD:()=>I,Qn:()=>r,Qo:()=>l,RT:()=>H,RU:()=>we,TP:()=>ue,US:()=>O,Vz:()=>E,Wk:()=>W,Xr:()=>le,Yy:()=>f,Z1:()=>D,Zf:()=>i,_B:()=>xe,aK:()=>w,aO:()=>p,be:()=>Ne,bx:()=>N,cc:()=>re,cp:()=>de,dP:()=>Y,eQ:()=>g,fj:()=>me,h0:()=>ie,hK:()=>K,iR:()=>ge,j$:()=>ke,jR:()=>he,ls:()=>ve,mA:()=>x,mI:()=>d,mN:()=>ce,nC:()=>c,nw:()=>be,r3:()=>R,rC:()=>k,t3:()=>G,tO:()=>Q,te:()=>P,th:()=>oe,uB:()=>q,uR:()=>ne,um:()=>z,x7:()=>A,xD:()=>L,xp:()=>U,yD:()=>pe,yJ:()=>ae,yQ:()=>j,yX:()=>T,yZ:()=>ye,zr:()=>u,zv:()=>J});var n=o(9379),a=(o(854),o(666)),s=o(6471);const r=(e,t)=>{if(s.A.isCorporateBooking()){const o=s.A.getAvailabilityEndpoint(!1);return s.A.get(o,(0,n.A)((0,n.A)({},e),{},{ln:t}))}return a.A.get("hotel/v2/hotel/availability",(0,n.A)((0,n.A)({},e),{},{ln:t}))},i=e=>a.A.get("payments/v1/gateways/hotel",e),l=(e,t,o)=>a.A.get("payments/v1/gateways/hotel",(0,n.A)((0,n.A)({},e),{},{contextType:t,contextValue:o})),c=e=>a.A.post("users/v1/getOrCreateCustomerBookingToken",e),d=e=>a.A.post("hotel/authorised/v1/bookings",e),u=e=>a.A.post("payments/authorized/v2/order/",e),h=e=>a.A.post("payments/authorized/v2/order/success",e),v=e=>a.A.post("payments/v1/gift-cards/reverse-voucher-on-dismiss",e),m=e=>a.A.get("hotel/v1/bookings",e),p=e=>a.A.get("hotel/v1/bookings",e),g=e=>a.A.get("hotel/v2/bookings",e),x=(e,t)=>a.A.put("hotel/v1/hotel/".concat(e,"/view"),t),f=(e,t)=>a.A.put("hotel/v1/hotel/".concat(e,"/whatsapp"),t),y=e=>a.A.get("hotel/v1/hotel/reviews?placeId=".concat(e)),j=e=>a.A.get("hotel/v2/hotel/reviews?hotelId=".concat(e)),k=(e,t,o)=>a.A.get("/hotel/v2/hotel/nearby-locations?latitude=".concat(t,"&longitude=").concat(o,"&hotelId=").concat(e)),b=()=>a.A.get("hotel/authorised/v2/hotel/lookups?type=pending_reason&ln=en"),w=e=>a.A.post("hotel/authorised/v1/abandonReason",e),N=e=>a.A.get("hotel/v1/hotel/instagramData?userName=".concat(e)),A=e=>a.A.get("hotel/v2/promotions/get-promotion?hotelId=".concat(e)),C=e=>a.A.get("hotel/v2/promotions/get-promotion",e),I=e=>a.A.get("hotel/authorized/v2/promotions/get-memberdeal-promotions",e),D=e=>a.A.get("hotel/v1/faq/get-faq?hotelId=".concat(e)),L=e=>a.A.post("hotel/v1/faq/add-faq",e),S=(e,t)=>a.A.get("hotel/v2/hotel/policies/".concat(e,"?ln=").concat(t)),R=e=>a.A.post("hotel/v1/bookings/cancel",e),B=e=>a.A.post("hotel/v1/bookings/cancel/info",e),M=e=>a.A.get("payments/authorised/v2/order/paymentDetails?bookingId=".concat(e)),P=(e,t)=>a.A.put("hotel/v1/hotel/".concat(e,"/").concat(t)),_=e=>a.A.post("hotel/v1/bookings/confirmation",e),T=e=>a.A.post("hotel/v1/hotel/travel-planner",e),G=(e,t)=>a.A.get("hotel/v1/hotel/is-lowest?hotelId=".concat(e,"&checkIn=").concat(t)),E=(e,t)=>a.A.get("hotel/v1/bookings/autofill?dialCode=".concat(e,"&mobile=").concat(t)),H=e=>{const t=new URLSearchParams(e).toString();return a.A.get("hotel/v2/promotions/returning-member-promotion?".concat(t))},O=e=>a.A.post("hotel/v2/promotions/verify-sterling-member",e),W=e=>a.A.post("hotel/v1/abandonReason/price-enquiry",e),F=e=>a.A.get("payments/v2/order/paymentDetails?bookingId=".concat(e)),z=e=>a.A.get("hotel/v1/profile/getProfile?hotelId=".concat(e)),K=()=>a.A.get("hotel/v1/hotel/slugs-list"),$=(e,t)=>a.A.get("hotel/v2/promotions/get-promotion-id?id=".concat(e,"&hotelId=").concat(t)),V=e=>a.A.get("hotel/v1/pricing_and_inventory/calendar-list",e),U=e=>a.A.get("payments/v1/tax/list?hotelId=".concat(e,"&page=1&pageSize=100&getDefaultTaxes=false")),Y=e=>a.A.post("hotel/v1/bookings/prices-logs",e),Z=e=>a.A.post("hotel/v1/bookings/is-room-available",e),q=e=>a.A.post("hotel/v2/promotions/validate-coupon-codes",e),J=e=>a.A.get("hotel/v2/bookings/".concat(e)),Q=e=>a.A.post("hotel/authorised/v1/bookings/modify-booking",e),X=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n="payments/v1/gateways/payment-provider?hotelId=".concat(e);return t&&(n+="&contextType=".concat(t)),o&&(n+="&contextValue=".concat(o)),a.A.get(n)},ee=e=>localStorage.getItem("corporateToken")?a.A.get("hotel/v1/corporate/agents/".concat(e)):Promise.resolve({status:404,data:null}),te=e=>a.A.get("/hotel/v1/hotel/bnpl-config?hotelId=".concat(e)),oe=e=>a.A.get("hotel/v1/chatbot/scripttag?hotelId=".concat(e)),ne=e=>a.A.post("hotel/v1/hotel/scraper/get-latest-price",e),ae=e=>a.A.get("hotel/v2/promotions/retargeting-promotion-hotel?hotelId=".concat(e)),se=e=>a.A.post("users/v1/otpCreateLoginAccount",e),re=e=>a.A.post("users/v1/otpLoginAccount",e),ie=e=>a.A.post("users/v1/verifyOtpLoginAccount",e),le=e=>a.A.post("users/v1/verifyOtpCreateLoginAccount",e),ce=e=>a.A.post("hotel/v2/bookings/is-rooms-available",e),de=e=>a.A.post("hotel/v1/hotel/inventory-retargtting",e),ue=e=>a.A.get("hotel/v1/hotel/get-videos?hotelId=".concat(e)),he=e=>a.A.post("hotel/v1/chatbot/request-voice-callback",e),ve=e=>a.A.get("hotel/v1/bookings?id=".concat(e)),me=e=>{let{bookingId:t}=e;return a.A.post("hotel/v2/bookings/".concat(t,"/booking-token"))},pe=e=>{let{hotelId:t}=e;return a.A.get("payments/v1/gateways/cod-payment-provider?hotelId=".concat(t))},ge=e=>{let{hotelId:t,checkInDate:o}=e;return a.A.get("hotel/v1/custom-messages/active?hotelId=".concat(t,"&checkInDate=").concat(o))},xe=e=>a.A.post("hotel/v1/hotel/send-roi",e),fe=e=>a.A.get("hotel/v1/pricing_and_inventory/next-available-dates",e),ye=e=>a.A.get("hotel/v1/hotel/booking-engine-config?hotelId=".concat(e)),je=(e,t,o)=>a.A.get("hotel/v2/hotel/nearby-hotels-availability?hotelId=".concat(e,"&checkInDate=").concat(t,"&checkOutDate=").concat(o)),ke=e=>a.A.get("hotel/v2/hotel/chain-hotels-lite-v2?chainId=".concat(e)),be=e=>a.A.get("hotel/v2/hotel/chain-hotels-summary?chainId=".concat(e)),we=(e,t,o,n)=>a.A.post("hotel/v1/loyalty/validate",{programName:e,memberId:t,amount:o,hotelId:n}),Ne=e=>a.A.post("payments/v1/gift-cards/balance",e),Ae=e=>{let{hotelId:t}=e;return a.A.get("payments/v1/gift-cards/enabled",{hotelId:t})}},5323:(e,t,o)=>{function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=o(3751),s=n(o(5043)),r=o(6046);o(5173),o(8620);var i=n(o(2213));function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),d(e.prototype.constructor=e,t)}
1function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(null==e)return{};var o,n,a={},s=Object.keys(e);for(n=0;n<s.length;n++)o=s[n],0<=t.indexOf(o)||(a[o]=e[o]);return a}var h=function(e){function t(){for(var t,o=arguments.length,n=new Array(o),a=0;a<o;a++)n[a]=arguments[a];return(t=e.call.apply(e,[this].concat(n))||this).history=r.createBrowserHistory(t.props),t}return c(t,e),t.prototype.render=function(){return s.createElement(a.Router,{history:this.history,children:this.props.children})},t}(s.Component),v=function(e){function t(){for(var t,o=arguments.length,n=new Array(o),a=0;a<o;a++)n[a]=arguments[a];return(t=e.call.apply(e,[this].concat(n))||this).history=r.createHashHistory(t.props),t}return c(t,e),t.prototype.render=function(){return s.createElement(a.Router,{history:this.history,children:this.props.children})},t}(s.Component),m=function(e,t){return"function"==typeof e?e(t):e},p=function(e,t){return"string"==typeof e?r.createLocation(e,null,null,t):e},g=function(e){return e},x=s.forwardRef;void 0===x&&(x=g);var f=x(function(e,t){var o=e.innerRef,n=e.navigate,a=e.onClick,r=u(e,["innerRef","navigate","onClick"]),i=r.target,c=l({},r,{onClick:function(t){try{a&&a(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||i&&"_self"!==i||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t)||(t.preventDefault(),n())}});return c.ref=g!==x&&t||o,s.createElement("a",c)}),y=x(function(e,t){var o=e.component,n=void 0===o?f:o,c=e.replace,d=e.to,h=e.innerRef,v=u(e,["component","replace","to","innerRef"]);return s.createElement(a.__RouterContext.Consumer,null,function(e){e||i(!1);var o=e.history,a=p(m(d,e.location),e.location),u=a?o.createHref(a):"",f=l({},v,{href:u,navigate:function(){var t=m(d,e.location),n=r.createPath(e.location)===r.createPath(p(t));(c||n?o.replace:o.push)(t)}});return g!==x?f.ref=t||h:f.innerRef=h,s.createElement(n,f)})}),j=function(e){return e},k=s.forwardRef;void 0===k&&(k=j);var b=k(function(e,t){var o=e["aria-current"],n=void 0===o?"page":o,r=e.activeClassName,c=void 0===r?"active":r,d=e.activeStyle,h=e.className,v=e.exact,g=e.isActive,x=e.location,f=e.sensitive,b=e.strict,w=e.style,N=e.to,A=e.innerRef,C=u(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return s.createElement(a.__RouterContext.Consumer,null,function(e){e||i(!1);var o=x||e.location,r=p(m(N,o),o),u=r.pathname,I=u&&u.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),D=I?a.matchPath(o.pathname,{path:I,exact:v,sensitive:f,strict:b}):null,L=!!(g?g(D,o):D),S="function"==typeof h?h(L):h,R="function"==typeof w?w(L):w;L&&(S=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return t.filter(function(e){return e}).join(" ")}(S,c),R=l({},R,d));var B=l({"aria-current":L&&n||null,className:S,style:R,to:r},C);return j!==k?B.ref=t||A:B.innerRef=A,s.createElement(y,B)})});Object.defineProperty(t,"W6",{enumerable:!0,get:function(){return a.useHistory}}),Object.defineProperty(t,"zy",{enumerable:!0,get:function(){return a.useLocation}})},5937:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});var n=o(5043),a=o(2582),s=o(4117),r=o(1526),i=o(5989),l=o(5346),c=o(5323),d=o(579);const u=e=>{let{isHotel:t=!0,slug:o="",id:u="",name:h="",brandName:v=""}=e;const[m,p]=(0,n.useState)("en"),g=(0,c.zy)(),x=(0,c.W6)(),[f]=(0,n.useState)(["www.bookmystay.io","bookmystay.io","dev.hotelzify.com","theme.dev-hotelzify.com","hotelzify.com","www.hotelzify.com"].includes(window.location.host)),[y]=(0,n.useState)(["dev.hotelzify.com","theme.dev-hotelzify.com","hotelzify.com","www.hotelzify.com","localhost:3005","booking.sterlingholidays.com","bookings.mhohotels.com","bookings.thealtruisthotels.com","bookings.subahotels.com","bookings.burgbnb.com","bookings.fernhotels.com","bookings.thealtitudehotels.com","stay.clubmahindra.com","bookings.rocklandhotels.com","bookings.oliveliving.com","booking.openhotels.in","booking.envihotel.com","owniacollection.com"].includes(window.location.host)),{t:j}=(0,s.Bd)();(0,n.useEffect)(()=>{let e=i.A.get("lang")||"en";p(e)},[]);return(0,d.jsxs)("footer",{className:"footer",id:"footer",role:"contentinfo",children:[(0,d.jsxs)("div",{className:"footerTexts",children:[!t&&(0,d.jsx)("p",{children:(0,d.jsx)(a.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:"/privacy-policy",children:j("privacy_policy")})}),!t&&(0,d.jsx)("p",{children:(0,d.jsx)(a.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:"/terms-conditions",children:j("terms_and_conditions")})}),t&&(0,d.jsxs)("label",{htmlFor:"language-selector",style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"10px"},children:[(0,d.jsx)("span",{id:"language-selector-label",children:j("change_language")}),(0,d.jsxs)("select",{id:"language-selector",name:"language",style:{border:"none",background:"transparent"},value:m,onChange:e=>{var t,o;let n=e.target.value;(0,l.fireGtmEvent)("language_changed",{languageSelected:n});const a=new URLSearchParams(g.search);a.set("language",n),x.push({pathname:g.pathname,search:a.toString()}),p(n),i.A.set("lang",n),(0,r.Ip)(n),null===(t=window)||void 0===t||null===(o=t.location)||void 0===o||o.reload()},"aria-labelledby":"language-selector-label",children:[(0,d.jsx)("option",{value:"en",children:"English"}),(0,d.jsx)("option",{value:"hi",children:"Hindi"}),(0,d.jsx)("option",{value:"de",children:"German"}),(0,d.jsx)("option",{value:"ar",children:"Arabic"}),(0,d.jsx)("option",{value:"zh",children:"Chinese"}),(0,d.jsx)("option",{value:"hr",children:"Croatian"}),(0,d.jsx)("option",{value:"cs",children:"Czech"}),(0,d.jsx)("option",{value:"fr",children:"French"}),(0,d.jsx)("option",{value:"it",children:"Italian"}),(0,d.jsx)("option",{value:"pl",children:"Polish"}),(0,d.jsx)("option",{value:"pt",children:"Portuguese"}),(0,d.jsx)("option",{value:"sl",children:"Slovenian"}),(0,d.jsx)("option",{value:"es",children:"Spanish"})]})]}),t&&(0,d.jsx)("p",{children:(0,d.jsx)(a.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:{pathname:y?"/".concat(o,"/privacy-policy"):"/privacy-policy",state:{slug:o}},children:j("privacy_policy")})}),t&&(0,d.jsx)("p",{children:(0,d.jsx)(a.N_,{style:{textDecoration:"none",color:"var(--text-gray)"},to:{pathname:y?"/".concat(o,"/terms-conditions"):"/terms-conditions",state:{slug:o}},children:j("terms_and_conditions")})}),(0,d.jsxs)("p",{style:{display:"flex",gap:"5px"},children:[j("powered_by")," ",(0,d.jsxs)("a",{href:"https://hotelzify.com",target:"_blank",rel:"noopener noreferrer","aria-label":"Visit Hotelzify website (opens in new tab)",children:[" ","Hotelzify"]})]})]}),(0,d.jsx)("div",{className:"footerAddress",style:{color:"#000"},children:(0,d.jsxs)("p",{style:{textTransform:"uppercase"},children:[j("copyrights")," \xa9"," ",null!==v&&void 0!==v&&v.trim()?v:h.split("|")[0]||h,"."," ",j("all_rights_reserved")]})}),!t&&(0,d.jsxs)("div",{className:"footerAddress",children:[(0,d.jsxs)("p",{children:[j("please_reach_us_at")," ",(0,d.jsx)("a",{href:"tel:+917975660291","aria-label":"Call Hotelzify at 79756 60291",children:"79756 60291"})]}),(0,d.jsx)("p",{children:"S4-101, Greenwood Regency, Bengaluru, Karnataka 560035"})]})]})}},6471:(e,t,o)=>{o.d(t,{A:()=>m});var n=o(9379),a=o(854),s=o.n(a),r=o(8173),i=o(5346),l=o(5989),c=o(6695);const d=s().create({baseURL:(u="https://api.hotelzify.com/",null!==u&&void 0!==u&&u.endsWith("/")?u.slice(0,-1):u)});var u;d.interceptors.request.use(e=>{const t=localStorage.getItem("corporateToken"),o=localStorage.getItem("corporateHotelId"),a=localStorage.getItem("corporateAgentId");if(console.log({corporateAgentId:a,corporateHotelId:o,corporateToken:t}),t&&o)e.headers.Authorization="Bearer ".concat(t),console.log({request:e}),"get"===e.method&&a&&(e.params=(0,n.A)((0,n.A)({},e.params),{},{corporateAgentId:a})),["post","put","patch"].includes(e.method)&&a&&e.data&&(e.data=(0,n.A)((0,n.A)({},e.data),{},{corporateAgentId:a}));else{const t=l.A.get("token");t&&(e.headers.Authorization="Bearer monne ".concat(t))}return e}),d.interceptors.response.use(null,e=>{const{status:t}=(null===e||void 0===e?void 0:e.response)||{};if(401===t){localStorage.removeItem("corporateToken"),localStorage.removeItem("corporateHotelId"),localStorage.removeItem("corporateAgentId"),l.A.remove("token");const e=new URLSearchParams(window.location.search),t=e.get("hotelId");e.get("corporate")&&t?window.location.href="/corporate-booking?hotelId=".concat(t,"&returnUrl=").concat(encodeURIComponent(window.location.pathname+window.location.search)):r.b.push("/")}return Promise.reject(e)});const h=async e=>{try{const{data:t}=await d(e);return 400===(null===t||void 0===t?void 0:t.status)&&(0,i.fireGtmEvent)("api_error",{url:null===e||void 0===e?void 0:e.url,params:null===e||void 0===e?void 0:e.params,payload:null===e||void 0===e?void 0:e.data,data:t}),t}catch(a){var t,o,n;if((null===a||void 0===a||null===(t=a.response)||void 0===t?void 0:t.status)>=500)(0,c.Cp)("API: ".concat(null===e||void 0===e||null===(n=e.url)||void 0===n?void 0:n.slice(0,30)," Failed!"),{data:{request:e,error:a}});return(0,i.fireGtmEvent)("api_error",{url:null===e||void 0===e?void 0:e.url,axiosObject:e,error:a}),(null===a||void 0===a||null===(o=a.response)||void 0===o?void 0:o.data)||{}}},v={get:(e,t)=>h({method:"GET",url:e,params:t}),post:(e,t)=>
1h({method:"POST",url:e,data:t}),put:(e,t)=>h({method:"PUT",url:e,data:t}),patch:(e,t)=>h({method:"PATCH",url:e,data:t}),delete:(e,t)=>h({method:"DELETE",url:e,data:t}),isCorporateBooking:()=>!!localStorage.getItem("corporateToken")&&!!localStorage.getItem("corporateHotelId"),getAvailabilityEndpoint:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return v.isCorporateBooking()?"hotel/authorized/v2/hotel/availability":e?"hotel/v2/hotel/availability/rateplan":"hotel/v2/hotel/availability"},clearCorporateSession:()=>{localStorage.clear()}},m=v},6851:(e,t,o)=>{o.d(t,{A:()=>a});o(5043);var n=o(579);const a=()=>(0,n.jsxs)("div",{className:"loader",children:[(0,n.jsx)("div",{className:"bar1"}),(0,n.jsx)("div",{className:"bar2"}),(0,n.jsx)("div",{className:"bar3"}),(0,n.jsx)("div",{className:"bar4"}),(0,n.jsx)("div",{className:"bar5"}),(0,n.jsx)("div",{className:"bar6"}),(0,n.jsx)("div",{className:"bar7"}),(0,n.jsx)("div",{className:"bar8"}),(0,n.jsx)("div",{className:"bar9"}),(0,n.jsx)("div",{className:"bar10"}),(0,n.jsx)("div",{className:"bar11"}),(0,n.jsx)("div",{className:"bar12"})]})},8059:(e,t,o)=>{o.r(t),o.d(t,{default:()=>f});var n=o(9379),a=o(5043),s=o(446),r=o.n(s),i=o(7100),l=(o(5016),o(3716)),c=o.n(l),d=o(4117),u=(o(5937),o(6851)),h=o(5346),v=o(3976),m=o(5989),p=o(475),g=o(270),x=o(579);const f=()=>{const{t:e}=(0,d.Bd)(),t="sterlingholidays"===new URLSearchParams(window.location.search).get("brand"),[o,s]=(0,a.useState)(!1),[l,f]=(0,a.useState)(null),[y,j]=(0,a.useState)(""),[k,b]=(0,a.useState)(""),w=(0,g.N)(),[N,A]=(0,a.useState)(!1),[C,I]=(0,a.useState)(null),[D,L]=(0,a.useState)(!1),[S,R]=(0,a.useState)(!1),[B,M]=(0,a.useState)(null),P=e=>{f(e),s(!0),j(""),b(""),I(null),L(!1)},_=()=>{s(!1),f(null),j(""),b(""),I(null),L(!1),M(null)};return(0,x.jsxs)("div",{className:"commonPage",children:[(0,x.jsxs)("main",{id:"main-content",className:"commonPageContainer",children:[(0,x.jsxs)("div",{className:"commonPageHeader",children:[(0,x.jsx)("h1",{children:"Manage Your Booking"}),(0,x.jsx)("p",{children:"Have an existing booking?"})]}),(0,x.jsxs)("div",{className:"commonPageButtons",children:[(0,x.jsxs)("button",{className:"commonPageBtn cancellationBtn",onClick:()=>P("cancellation"),"aria-label":"Cancel your booking",children:[(0,x.jsx)("div",{className:"btnIconWrapper",children:(0,x.jsxs)("svg",{className:"btnIcon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),(0,x.jsx)("path",{d:"M15 9L9 15M9 9L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}),(0,x.jsx)("span",{className:"btnText",children:"Cancellation"}),(0,x.jsx)("span",{className:"btnSubtext",children:"Cancel your reservation"}),(0,x.jsx)("div",{className:"btnArrow",children:(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M5 12H19M19 12L12 5M19 12L12 19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,x.jsxs)("button",{className:"commonPageBtn statusBtn",onClick:()=>P("booking_status"),"aria-label":"Check your booking status",children:[(0,x.jsx)("div",{className:"btnIconWrapper",children:(0,x.jsxs)("svg",{className:"btnIcon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),(0,x.jsx)("path",{d:"M12 7v5l3 3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,x.jsx)("span",{className:"btnText",children:"Booking Status"}),(0,x.jsx)("span",{className:"btnSubtext",children:"Check your booking & refund status"}),(0,x.jsx)("div",{className:"btnArrow",children:(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M5 12H19M19 12L12 5M19 12L12 19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,x.jsxs)("button",{className:"commonPageBtn modificationBtn",onClick:()=>P("modification"),"aria-label":"Modify your booking",children:[(0,x.jsx)("div",{className:"btnIconWrapper",children:(0,x.jsxs)("svg",{className:"btnIcon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M11 4H4C3.46957 4 2.96086 4.21071 2.58579 4.58579C2.21071 4.96086 2 5.46957 2 6V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M18.5 2.50001C18.8978 2.10219 19.4374 1.87869 20 1.87869C20.5626 1.87869 21.1022 2.10219 21.5 2.50001C21.8978 2.89784 22.1213 3.4374 22.1213 4.00001C22.1213 4.56262 21.8978 5.10219 21.5 5.50001L12 15L8 16L9 12L18.5 2.50001Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,x.jsx)("span",{className:"btnText",children:"Modification"}),(0,x.jsx)("span",{className:"btnSubtext",children:"Change your reservation details"}),(0,x.jsx)("div",{className:"btnArrow",children:(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M5 12H19M19 12L12 5M19 12L12 19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]}),o&&(0,x.jsx)("div",{className:"modalOverlay",onClick:e=>{e.target.classList.contains("modalOverlay")&&_()},children:(0,x.jsxs)("div",{className:"modalContent ".concat(o?"modalShow":""),children:[(0,x.jsx)("button",{className:"modalCloseBtn",onClick:_,"aria-label":"Close modal",children:(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,x.jsxs)("div",{className:"modalHeader ".concat(l),children:[(0,x.jsx)("div",{className:"modalIconWrapper",children:"cancellation"===l?(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),(0,x.jsx)("path",{d:"M15 9L9 15M9 9L15 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):"booking_status"===l?(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),(0,x.jsx)("path",{d:"M12 7v5l3 3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}):(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M11 4H4C3.46957 4 2.96086 4.21071 2.58579 4.58579C2.21071 4.96086 2 5.46957 2 6V20C2 20.5304 2.21071 21.0391 2.58579 21.4142C2.96086 21.7893 3.46957 22 4 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M18.5 2.50001C18.8978 2.10219 19.4374 1.87869 20 1.87869C20.5626 1.87869 21.1022 2.10219 21.5 2.50001C21.8978 2.89784 22.1213 3.4374 22.1213 4.00001C22.1213 4.56262 21.8978 5.10219 21.5 5.50001L12 15L8 16L9 12L18.5 2.50001Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,x.jsx)("h2",{children:"cancellation"===l?D?"Confirm Cancellation":"Cancel Booking":"booking_status"===l?D?"Booking Status":"Check Booking Status":"Modify Booking"}),(0,x.jsx)("p",{children:D&&"booking_status"!==l?"Review your booking details before cancelling":"Please enter your booking details to continue"})]}),(0,x.jsx)("div",{className:"modalBody",children:D?"booking_status"===l?(0,x.jsxs)("div",{className:"statusDisplay",children:[(0,x.jsxs)("div",{className:"statusBookingHeader",children:[(0,x.jsx)("span",{className:"statusBookingIdLabel",children:"Booking ID"}),(0,x.jsxs)("span",{className:"statusBookingIdValue",children:["#",y]})]}),0===(null===B||void 0===B?void 0:B.length)&&(0,x.jsxs)("div",{className:"statusEmptyState",children:[(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5"}),(0,x.jsx)("path",{d:"M12 8v4M12 16h.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),(0,x.jsx)("p",{children:"No booking found"}),(0,x.jsx)("span",{children:"Please check your booking ID and try again."})]}),null===B||void 0===B?void 0:B.map((e,t)=>{var o;const n=(e=>{if(!e)return"status-default";const t=e.toLowerCase();return t.includes("confirm")||t.includes("success")||t.includes("paid")?"status-confirmed":t.includes("cancel")?"status-cancelled":t.includes("pending")||t.includes("process")?"status-pending":"status-default"})(e.status),a=e.isRefunded||e.refundAmount;return(0,x.jsxs)("div",{className:"paymentCard",children:[(0,x.jsxs)("div",{className:"statusHero ".concat(n),children:[(0,x.jsx)("div",{className:"statusHeroIcon",children:"status-confirmed"===n?(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"2"}),(0,x.jsx)("path",{d:"M7 12.5l3.5 3.5 6.5-7",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})]}):"status-cancelled"===n?(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"2"}),(0,x.jsx)("path",{d:"M15 9L9 15M9 9l6 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]}):(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10",fill:"currentColor",fillOpacity:"0.15",stroke:"currentColor",strokeWidth:"2"}),(0,x.jsx)("path",{d:"M12 7v5l3 3",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,x.jsx)("div",{className:"statusHeroLabel",children:"Payment Status"}),(0,x.jsx)("div",{className:"statusHeroBadge",children:e.status}),(0,x.jsx)("div",{className:"statusHeroGateway",children:e.gateway})]}),(0,x.jsxs)("div",{className:"statusFinancials",children:[(0,x.jsxs)("div",{className:"financialItem",children:[(0,x.jsx)("span",{className:"financialLabel",children:"Amount Paid"}),(0,x.jsxs)("span",{className:"financialValue",children:[(0,p.Gl)(e.currency)," ",Number(e.amountPaid).toLocaleStr
1ing("en-IN",{minimumFractionDigits:2})]})]}),a&&(0,x.jsxs)("div",{className:"financialItem refundLine",children:[(0,x.jsx)("span",{className:"financialLabel",children:"Refund Amount"}),(0,x.jsxs)("span",{className:"financialValue refundAmt",children:[(0,p.Gl)(e.currency)," ",Number(e.refundAmount).toLocaleString("en-IN",{minimumFractionDigits:2})]})]})]}),(0,x.jsxs)("div",{className:"txnIds",children:[e.transactionId&&(0,x.jsxs)("div",{className:"txnRow",children:[(0,x.jsx)("span",{className:"txnLabel",children:"Payment ID"}),(0,x.jsx)("span",{className:"txnValue",children:e.transactionId})]}),e.orderId&&(0,x.jsxs)("div",{className:"txnRow",children:[(0,x.jsx)("span",{className:"txnLabel",children:"Order ID"}),(0,x.jsx)("span",{className:"txnValue",children:e.orderId})]}),e.refundId&&(0,x.jsxs)("div",{className:"txnRow",children:[(0,x.jsx)("span",{className:"txnLabel",children:"Refund ID"}),(0,x.jsx)("span",{className:"txnValue",children:e.refundId})]})]}),(null===(o=e.refundData)||void 0===o?void 0:o.length)>0&&(0,x.jsxs)("div",{className:"refundSection",children:[(0,x.jsxs)("div",{className:"refundSectionHeader",children:[(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",children:(0,x.jsx)("path",{d:"M3 12h18M3 12l4-4m-4 4l4 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,x.jsx)("span",{children:"Refund Breakdown"}),(0,x.jsxs)("span",{className:"refundCount",children:[e.refundData.length," ",1===e.refundData.length?"entry":"entries"]})]}),(0,x.jsx)("div",{className:"refundTimeline",children:e.refundData.map((e,t)=>{const o=(e=>{if(!e)return"refund-default";const t=e.toLowerCase();return t.includes("complete")||t.includes("success")||t.includes("processed")?"refund-completed":t.includes("pending")||t.includes("initiat")?"refund-pending":t.includes("fail")||t.includes("reject")?"refund-failed":"refund-default"})(e.status),n=e.acquirer_data?Object.values(e.acquirer_data)[0]:null;return(0,x.jsxs)("div",{className:"refundTimelineEntry",children:[(0,x.jsxs)("div",{className:"refundTimelineTop",children:[(0,x.jsxs)("div",{className:"refundTimelineMeta",children:[(0,x.jsx)("span",{className:"refundTimelineDate",children:r().unix(e.created_at).format("DD MMM YYYY, hh:mm A")}),(0,x.jsx)("span",{className:"refundStatusPill ".concat(o),children:e.status})]}),(0,x.jsxs)("div",{className:"refundTimelineAmt",children:[(0,p.Gl)(e.currency)," ",(e.amount/100).toLocaleString("en-IN",{minimumFractionDigits:2})]})]}),(0,x.jsxs)("div",{className:"refundTimelineIds",children:[e.id&&(0,x.jsxs)("div",{className:"refundTimelineId",children:[(0,x.jsx)("span",{children:"Refund ID"}),(0,x.jsx)("span",{children:e.id})]}),n&&(0,x.jsxs)("div",{className:"refundTimelineId",children:[(0,x.jsx)("span",{children:"RRN"}),(0,x.jsx)("span",{children:n})]}),e.speed_processed&&(0,x.jsxs)("div",{className:"refundTimelineId",children:[(0,x.jsx)("span",{children:"Speed"}),(0,x.jsx)("span",{style:{textTransform:"capitalize"},children:e.speed_processed})]})]})]},e.id||t)})})]})]},e.id||t)})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"bookingDetailsCard",children:[(0,x.jsxs)("div",{className:"bookingDetailRow",children:[(0,x.jsx)("span",{className:"bookingDetailLabel",children:"Total Amount"}),(0,x.jsxs)("span",{className:"bookingDetailValue",children:[(0,p.Gl)(null===C||void 0===C?void 0:C.currency)," ",null===C||void 0===C?void 0:C.totalAmount]})]}),(0,x.jsxs)("div",{className:"bookingDetailRow",children:[(0,x.jsx)("span",{className:"bookingDetailLabel",children:"Amount Paid"}),(0,x.jsxs)("span",{className:"bookingDetailValue",children:[(0,p.Gl)(null===C||void 0===C?void 0:C.currency)," ",null===C||void 0===C?void 0:C.amountPaid]})]}),(null===C||void 0===C?void 0:C.giftCardAmount)>0&&(0,x.jsxs)("div",{className:"bookingDetailRow",children:[(0,x.jsx)("span",{className:"bookingDetailLabel",children:"Gift Card"}),(0,x.jsxs)("span",{className:"bookingDetailValue",children:[(0,p.Gl)(null===C||void 0===C?void 0:C.currency)," ",null===C||void 0===C?void 0:C.giftCardAmount]})]}),(null===C||void 0===C?void 0:C.giftCardRefundAmount)>0&&(0,x.jsxs)("div",{className:"bookingDetailRow refund",children:[(0,x.jsx)("span",{className:"bookingDetailLabel",children:"Gift Card Refund"}),(0,x.jsxs)("span",{className:"bookingDetailValue",children:[(0,p.Gl)(null===C||void 0===C?void 0:C.currency)," ",null===C||void 0===C?void 0:C.giftCardRefundAmount]})]}),(null===C||void 0===C?void 0:C.convenienceFee)>0&&(0,x.jsxs)("div",{className:"bookingDetailRow",children:[(0,x.jsxs)("div",{className:"convenienceFeeLabel",children:[(0,x.jsx)("span",{className:"bookingDetailLabel",children:"Convenience Fee"}),(0,x.jsxs)("div",{className:"tooltipContainer",children:[(0,x.jsx)("span",{className:"tooltipIcon",children:"?"}),(0,x.jsx)("div",{className:"tooltipText",children:e("processing_fee_notice")})]})]}),(0,x.jsxs)("span",{className:"bookingDetailValue",children:[(0,p.Gl)(null===C||void 0===C?void 0:C.currency)," ",null===C||void 0===C?void 0:C.convenienceFee]})]}),(null===C||void 0===C?void 0:C.refundAmount)>0&&(0,x.jsxs)("div",{className:"bookingDetailRow refund",children:[(0,x.jsx)("span",{className:"bookingDetailLabel",children:"Refund Amount"}),(0,x.jsxs)("span",{className:"bookingDetailValue",children:[(0,p.Gl)(null===C||void 0===C?void 0:C.currency)," ",null===C||void 0===C?void 0:C.refundAmount]})]})]}),(0,x.jsxs)("div",{className:"cancelConfirmation",children:[(0,x.jsx)("p",{children:"Are you sure you want to cancel this booking?"}),(0,x.jsxs)("div",{className:"confirmationButtons",children:[(0,x.jsx)("button",{className:"confirmBtn yes",onClick:async()=>
1{if(S)return;let e=(0,i.parsePhoneNumber)(String(k)),t={dialCode:"+".concat(null===e||void 0===e?void 0:e.countryCallingCode),mobile:null===e||void 0===e?void 0:e.nationalNumber.replace(/\s+/g,""),bookingId:y};(0,h.fireGtmEvent)("cancel_booking",{cancelData:t});try{R(!0);const e=await(0,v.r3)(t);200===(null===e||void 0===e?void 0:e.status)?(c().success("Booking cancelled successfully!"),window.location.href="/bookings/confirmation/".concat(y)):c().error("Something went wrong. Please try again.")}catch(o){(0,h.fireGtmEvent)("cancel_api_failed",(0,n.A)((0,n.A)({},t),{},{error:null===o||void 0===o?void 0:o.message})),c().error("Something went wrong. Please try again.")}finally{R(!1)}},disabled:S,children:S?(0,x.jsx)(u.A,{}):"Yes"}),(0,x.jsx)("button",{className:"confirmBtn no",onClick:_,children:"No"})]})]})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"inputGroup",children:[(0,x.jsx)("label",{htmlFor:"modal-booking-id",children:"Booking ID"}),(0,x.jsx)("input",{id:"modal-booking-id",type:"text",value:y,onChange:e=>j(e.target.value),placeholder:"Enter your booking ID","aria-required":"true",inputMode:"numeric",autoComplete:"off"})]}),"cancellation"===l&&(0,x.jsxs)("div",{className:"inputGroup",children:[(0,x.jsx)("label",{htmlFor:"modal-phone",children:"Contact Number"}),(0,x.jsx)(i.Ay,{id:"modal-phone",defaultCountry:w,placeholder:"Enter your phone number",value:k,name:"phone",onChange:e=>b(e),"aria-required":"true",autoComplete:"tel"})]}),(0,x.jsx)("button",{className:"verifyBtn ".concat(l),onClick:async()=>{if(!y)return void c().error("Please enter booking ID");if("modification"===l)return(0,h.fireGtmEvent)("modification_booking_verify",{data:{bookingId:y},type:l}),void(window.location.href="/bookings/modify/".concat(y));if("booking_status"===l){try{A(!0);const e=m.A.get("token");m.A.set("token","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEwNDUwNCwicm9sZSI6NCwicm9sZXMiOiJBRE1JTiIsImhvdGVsSWRzIjpbMjY4MzQsMjgyNSwyNTg4NywyNjI4NywyNjI4OCwyNjY5NiwzMDc0NSwzODYxNiwzODYzMSw0MTM2MF0sImlhdCI6MTc4MTg0ODMyMSwiZXhwIjoyMzg2NjQ4MzIxfQ.pqYrAwlsnc6vzU569eR6NUMlEmqeoHNkLUyDGNkyItg");const o=await(0,v.Ak)(y);e?m.A.set("token",e):m.A.remove("token");const n=Array.isArray(o)?o:Array.isArray(null===o||void 0===o?void 0:o.data)?o.data:null;null!==n&&n.length>0?(M(n),L(!0)):t?window.open("https://www.sterlingholidays.com/","_blank"):null!==n?(M(n),L(!0)):c().error("Could not fetch booking status. Please try again.")}catch(a){c().error("Something went wrong. Please try again.")}finally{A(!1)}return}if(!k||!(0,i.g0)(String(k)))return void c().error("Please enter valid phone number");let e=(0,i.parsePhoneNumber)(String(k)),o={dialCode:"+".concat(null===e||void 0===e?void 0:e.countryCallingCode),mobile:null===e||void 0===e?void 0:e.nationalNumber,bookingId:y};(0,h.fireGtmEvent)("".concat(l,"_booking_verify"),{data:o,type:l});try{A(!0);const e=await(0,v.L3)(o);if(200===(null===e||void 0===e?void 0:e.status))I(null===e||void 0===e?void 0:e.data),L(!0);else if(400===(null===e||void 0===e?void 0:e.status)){if(t)return void window.open("https://www.sterlingholidays.com/","_blank");c().error("Booking ID is not valid!")}}catch(a){(0,h.fireGtmEvent)("".concat(l,"_verify_failed"),(0,n.A)((0,n.A)({},o),{},{error:null===a||void 0===a?void 0:a.message})),c().error("Something went wrong. Please try again.")}finally{A(!1)}},disabled:N,"aria-label":N?"Verifying...":"Verify booking",children:N?(0,x.jsx)(u.A,{}):"Verify"})]})})]})})]})}},8620:(e,t,o)=>{o.r(t),o.d(t,{default:()=>n});const n=function(e,t){}}}]); 2//# sourceMappingURL=8059.e1de21e1.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.