PageSourceSearch

https://www.kayak.com/c/wp-content/plugins/r9-components/public/Sticky/scripts.js?ver=35848223867

js kayak.com collected 2026-09-24 07:34:21 UTC 8,344 bytes, 2 lines download raw bytes

vendor: 1,906 bytes, line 1
1(()=>{var t={873(t,e,r){var o=r(325).Symbol;t.exports=o},552(t,e,r){var o=r(873),i=r(659),n=r(969),s=o?o.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):n(t)}},128(t,e,r){var o=r(800),i=/^\s+/;t.exports=function(t){return t?t.slice(0,o(t)+1).replace(i,""):t}},840(t,e,r){var o="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=o},659(t,e,r){var o=r(873),i=Object.prototype,n=i.hasOwnProperty,s=i.toString,c=o?o.toStringTag:void 0;t.exports=function(t){var e=n.call(t,c),r=t[c];try{t[c]=void 0;var o=!0}catch(t){}var i=s.call(t);return o&&(e?t[c]=r:delete t[c]),i}},969(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},325(t,e,r){var o=r(840),i="object"==typeof self&&self&&self.Object===Object&&self,n=o||i||Function("return this")();t.exports=n},800(t){var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},221(t,e,r){var o=r(805),i=r(124),n=r(374),s=Math.max,c=Math.min;t.exports=function(t,e,r){var l,a,u,d,h,f,g=0,p=!1,v=!1,y=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(e){var r=l,o=a;return l=a=void 0,g=e,d=t.apply(o,r)}function S(t){var r=t-f;return void 0===f||r>=e||r<0||v&&t-g>=u}function b(){var t=i();if(S(t))return w(t);h=setTimeout(b,function(t){var r=e-(t-f);return v?c(r,u-(t-g)):r}(t))}function w(t){return h=void 0,y&&l?m(t):(l=a=void 0,d)}function x(){var t=i(),r=S(t);if(l=arguments,a=this,f=t,r){if(void 0===h)return function(t){return g=t,h=setTimeout(b,e),p?m(t):d}(f);if(v)return clearTimeout(h),h=setTimeout(b,e),m(f)}return void 0===h&&(h=setTimeout(b,e)),d}return e=n(e)||0,o(r)&&(p=!!r.leading,u=(v="maxWait"in r)?s(n(r.maxWait)||0,e):u,y="trailing"in r?!!r.trailing:y),x.cancel=function(){void 0!==h&&clearTimeout(h),g=0,l=f=a=h=void 0},x.flush=function(){return void 0===h?d:w(i())},x}
1},805(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},346(t){t.exports=function(t){return null!=t&&"object"==typeof t}},394(t,e,r){var o=r(552),i=r(346);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==o(t)}},124(t,e,r){var o=r(325);t.exports=function(){return o.Date.now()}},350(t,e,r){var o=r(221),i=r(805);t.exports=function(t,e,r){var n=!0,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return i(r)&&(n="leading"in r?!!r.leading:n,s="trailing"in r?!!r.trailing:s),o(t,e,{leading:n,maxWait:e,trailing:s})}},374(t,e,r){var o=r(128),i=r(805),n=r(394),s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,a=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(n(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=o(t);var r=c.test(t);return r||l.test(t)?a(t.slice(2),r?2:8):s.test(t)?NaN:+t}}};const e={};function r(o){const i=e[o];if(void 0!==i)return i.exports;const n=e[o]={exports:{}};return t[o](n,n.exports,r),n.exports}r.n=t=>{const e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(350),e=r.n(t);class o{constructor(t,e=!1){if(this.handlers=[],this.event=t,e){let t;window.addEventListener(this.event,()=>{t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(this.fire.bind(this))},!1)}else window.addEventListener(this.event,this.fire.bind(this));"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?this.fire():document.addEventListener("DOMContentLoaded",()=>{this.fire()})}subscribe(t,e=!1){this.handlers.push(t),e&&t()}unsubscribe(t){this.handlers=this.handlers.filter(e=>{if(e!==t)return e})}fire(){this.handlers.forEach(t=>{t()})}}const i=new o("resize",!0);function n(t,e=0){if(!t||t.length<=1)return;const r=document.getElementById(t);if(!r)return;setTimeout(()=>{const t=s(r)-e;window.scrollBy({top:t,left:0,behavior:"smooth"})},0);let o=0;const i=setInterval(()=>{o++;const n=window.innerHeight+window.scrollY>=document.body.offsetHeight-2;(s(r)-e===0||n||o>=20)&&(r.tabIndex="-1",function(t,e={}){if(!t)return;t.setAttribute("data-no-focus-outline","true"),t.focus(e);const r=()=>{t.removeAttribute("data-no-focus-outline"),t.removeEventListener("blur",r)};t.addEventListener("blur",r,{once:!0})}(r,{preventScroll:!0,focusVisible:!1}),window.location.hash!==`#${t}`&&window.history.pushState("","",window.location.pathname+window.location.search+`#${t}`),clearInterval(i))},50)}function s(t){return Math.floor(t.getBoundingClientRect().top)}new o("scroll",!0);const c=["top","bottom"],l=["persist"],a="is-active-sticky",u={top:0,bottom:0};function d(t){return t.getBoundingClientRect().height}const h=new class{constructor(){return void 0!==window.r9ComponentsStickyService?window.r9ComponentsStickyService:(window.r9ComponentsStickyService=this,this._registry=[],this.currentScrollShifts=u,this._smoothScrollRetryCount=0,this._maxSmoothScrollRetries=10,this.init(),this)}get registry(){return this._registry}set registry(t){this._registry=t,this.onRegistryUpdate()}init(){document.addEventListener("scroll",e()(this.onScroll.bind(this),100)),document.addEventListener("scrollend",this.handleUrlWithHashOnScrollEnd.bind(this),{once:!0}),i.subscribe(this.onResize.bind(this),!1)}getRegistry(){return this.registry}register(t){0===this.getRegistry().length&&this.subscribeToSmoothScrollService();const e=t.dataset.stickyProps,[r,o]=e.split(","),i=void 0!==r,n=c.includes(r);try{if(!i||!n)throw new Error("StickyService: Invalid dataset properties");const e=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),s={el:t,offsetProp:r,calculatedOffsetVal:null,height:d(t),persist:void 0!==o&&l.includes(o),uuid:e};this.registry=[...this.registry,s],t.classList.add("is-ready-sticky"),t.setAttribute("data-sticky-uuid",e)}catch(t){console.error(t)}}isSticky(t){return this.registry.some(e=>e.uuid===t.getAttribute("data-sticky-uuid"))}getOffsets(t){return this.getRecordOffsets(t.getAttribute("data-sticky-uuid"))}getRecordOffsets(t){let e=u;const r=this.registry.find(e=>e.uuid===t);return r?(e[r.offsetProp]=r.calculatedOffsetVal,e):e}getProjectedTotalStickyOffset(t,e="top"){if(!c.includes(e))return 0;const r=t.getBoundingClientRect()[e];let o=0,i=null;
1return this.registry.forEach(t=>{t.offsetProp===e&&(t.el.getBoundingClientRect()[e]<=r&&(o+=t.height,i&&!i.persist&&(o-=i.height)),i=t)}),o}onRegistryUpdate(){this.registry.forEach((t,e)=>{const r=this.registry.slice(0,e).reduce((e,r)=>e+(r.persist&&r.offsetProp===t.offsetProp?r.height:0),0);t.el.style[t.offsetProp]=r+"px",t.calculatedOffsetVal=r})}onScroll(){this.registry.forEach(t=>{const e=t.el;e.getBoundingClientRect()[t.offsetProp]===t.calculatedOffsetVal?(e.classList.add(a),this.currentScrollShifts[t.offsetProp]=t.calculatedOffsetVal+t.height):e.classList.remove(a)})}updateRecordsHeights(){const t=[...this.registry];t.forEach(t=>{t.height=d(t.el)}),this.registry=t}onResize(){this.updateRecordsHeights(),this.onScroll()}getSmoothScrollService(){try{return this._getSmoothScrollServiceInstance()}catch(t){return null}}_getSmoothScrollServiceInstance(){return"undefined"!=typeof window&&window.r9ComponentsAnchorLinkService?window.r9ComponentsAnchorLinkService:null}subscribeToSmoothScrollService(){const t=this.getSmoothScrollService();t?t.subscribe(t=>{this.handleSmoothScrollWithStickyOffsets(t,"top")},!0):this._smoothScrollRetryCount<this._maxSmoothScrollRetries&&(this._smoothScrollRetryCount++,setTimeout(()=>{this.subscribeToSmoothScrollService()},100))}handleSmoothScrollWithStickyOffsets(t,e="top"){const r=document.getElementById(t);r&&n(t,this.getProjectedTotalStickyOffset(r,e))}handleUrlWithHashOnScrollEnd(){const t=window.location.hash.match(/^#(.+)$/)?.[1];if(!t)return;const e=document.getElementById(t);e&&setTimeout(()=>{const r=this.getProjectedTotalStickyOffset(e,"top");n(t,r)},0)}};document.querySelectorAll("[data-sticky-props]").forEach(t=>{h.register(t)})})()})();
2//# sourceMappingURL=scripts.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.