
!function() {
    var globalThis = {};
    (function(e,k){"function"==typeof define&&define.amd?define("framework/scripts/react-widget-boot",["exports"],k):"undefined"!=typeof exports?k(exports):(k(k={}),e.frameworkScriptsReactWidgetBoot=k)})("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,function(e){function k(c){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:document.getElementsByTagName("head")[0]||document.body||document.documentElement;
return new Promise(function(b,d){function h(d){f.parentNode&&f.parentNode.removeChild(f);clearTimeout(a);b(d)}var f=document.createElement("script"),a=setTimeout(function(){d("script loading timeout: 120s")},12E4);Object.keys(g).forEach(function(a){f.setAttribute(a,g[a])});f.onload=h;f.onreadystatechange=h;f.addEventListener("load",h);f.addEventListener("error",function(b){f.parentNode&&f.parentNode.removeChild(f);clearTimeout(a);d(b)});f.type="text/javascript";f.src=c;e.appendChild(f)})}function l(c,
g){q&&(c={name:c,message:function b(d){if("string"==typeof d)return d;if(d instanceof Error)return d.message||"No error message!";if(Array.isArray(d)&&d){var h=Array.prototype.slice.call(d);if(h.length)return b(h.shift())}return"Unexpected message format received: "+JSON.stringify(d)}(g),referer:window.location.href},g=new URLSearchParams(c),fetch(r+"?"+g,{mode:"no-cors",cache:"no-cache",credentials:"omit",referrerPolicy:"no-referrer"}))}function t(c){var g;c&&n&&(c.innerHTML="",(g=document.createElement("img")).setAttribute("src",
n),g.setAttribute("style","margin:0 auto;padding:10px"),c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c.appendChild(g))}function w(c,g){return new Promise(function(e,b){function d(){var b=setInterval(function(){var d,h,c=a.contentWindow;c&&((d=c.document.body).setAttribute("class","react react-st"),(h=document.createElement("div")).setAttribute("id","root"),d.appendChild(h),clearInterval(b),clearTimeout(f),e(c))},200)}function h(a){clearTimeout(f);b(a)}var f=setTimeout(function(){b("frame creation timeout: 60s")},
6E4),a=document.createElement("iframe");a.scrolling="no";a.style.border="0";a.style.overflow="hidden";a.style.display="none";a.style.width="100%";a.name=g;a.setAttribute("data-testid","iframe-main");a.onload=d;a.onerror=h;a.addEventListener("load",d);a.addEventListener("error",h);c.appendChild(a)})}function u(){var c,g,e={addDocumentScript:k,init:function(b){var d=b.containerId,h=b.type;return n=b.spinnerPath,c=b.fieldMap,r=b.errorUrl,g=b.scriptPath,q=b.log,e.load(d,h,g,b.attributes)},load:function(b,
d,h){var f=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if(c&&b&&d){var a,m,p=document.getElementById(b);if(p)return t(p),m=Object.entries(c).reduce(function(a,b){var d=p.getAttribute("data-"+b[1]);return d&&(a[b[0]]=d),a},{}),a="_kyk_cb__"+b,m=new URLSearchParams(Object.assign(m,{containerId:b,type:d,callback:a,referer:window.location.href})),window[a]=function(b){return delete window[a],e.loadBoot(b)},k((h||g)+"?"+m,f).catch(function(a){l("load",a);console.error("failed to init search widget",
a)});l("load - containerId",b);console.error("Failed to find containerId",b)}},loadBoot:function(b){var d=b.containerId,c=document.getElementById(d);c?(t(c),w(c,d).then(function(d){Promise.resolve().then(v(function(){return a=b.scripts,c=d.document.head,a.syncAction?a.core.reduce(function(b,d){return b.then(function(){return k(d,a.attributes.core,c)}).catch(function(a){l("loadCoreScripts",a);console.error("failed to load loadCoreScripts",a)})},Promise.resolve()):Promise.all(a.core.map(function(b){return k(b,
a.attributes.core,c)})).catch(function(a){l("loadCoreScripts",a);console.error("failed to load loadCoreScripts",a)});var a,c})).then(v(function(){return a=b.scripts,c=d.document.head,Promise.all(a.component.map(function(b){return k(b,a.attributes.component,c)})).catch(function(a){l("loadComponentsScripts",a);console.error("failed to load loadComponentsScripts",a)});var a,c})).then(function(){c.style.removeProperty("height");c.style.removeProperty("display");c.style.removeProperty("align-items");c.style.removeProperty("justify-content");
try{d.R9.react.boot(b.bootOptions)}catch(a){l("loadBoot - react",a),console.error("failed to boot search widget",a)}}).catch(function(a){l("loadBoot",a);console.error("failed to boot search widget",a)})}).catch(function(b){l("iFrameCreation",b);console.error("failed to create iframe",b)})):(l("loadBoot - containerId",d),console.error("Failed to find containerId",d))}};return e}Object.defineProperty(e,"__esModule",{value:!0});e.Widget=u;var n="",r="",q=!1,v=function(c){return function(e){return c(e).then(function(){return e})}};
e=window;e.R9=e.R9||{};e.R9.react=e.R9.react||{};e.R9.react.widget=e.R9.react.widget||u()});
    window.R9.react.widget.init({"containerId":"kayakWidget3","type":"direct","scriptPath":"https:\/\/www.kayak.com\/react-search-widget\/load","errorUrl":"https:\/\/www.kayak.com\/react-search-widget\/error","spinnerPath":"https:\/\/content.r9cdn.net\/res\/images\/horizon\/affiliatewidget\/spinner.svg?v=772eda2368b694dc609dde01451b6c96e3d191d4&cluster=4","log":true,"attributes":{},"fieldMap":{"countryCode":"country-code","languageCode":"language-code","currencyCode":"currency-code","vertical":"vertical","verticalList":"vertical-list","fromLocation":"fill-location-from","toLocation":"fill-location-to","disableCompareTo":"disable-compare-to","theme":"theme","affiliateId":"affiliate-id","locationId":"location-id","clickId":"click-id","fillTripType":"fill-trip-type","fillDate1Exact":"fill-date1-exact","fillDate2Exact":"fill-date2-exact","fillDate1Days":"fill-date1-days","fillDate2Days":"fill-date2-days","travelerInfo":"traveler-info","label":"label","sortHotels":"sort-hotels","filterHotels":"filter-hotels","sortCars":"sort-cars","filterCars":"filter-cars","sortFlights":"sort-flights","filterFlights":"filter-flights","sortPackages":"sort-packages","filterPackages":"filter-packages","errorId":"error-id","redirectServer":"redirect-server","urlPrefix":"url-prefix","openNewWindow":"open-new-window","exploreEnabled":"explore-enabled","placementId":"placement-id","programId":"program-id","bannerId":"banner-id","publisherId":"publisher-id","referralId":"referral-id"}});
}();
