1(function(){var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=`site-search-recent`,r=500;function i(e){return e.length<=r}function a(e){return typeof e==`string`&&i(e)}function o(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(a):[]}catch(t){return console.warn(`[recent-searches] Failed to parse stored searches; resetting.`,{err:t,raw:e}),[]}}function s(){if(!globalThis.localStorage)return[];try{return o(localStorage.getItem(n))}catch(e){return console.warn(`[recent-searches] localStorage is inaccessible; recent searches disabled.`,{err:e}),[]}}function c(e){if(!globalThis.localStorage)return!1;try{return localStorage.setItem(n,JSON.stringify(e)),!0}catch(e){return console.warn(`[recent-searches] Failed to write recent searches.`,{err:e}),!1}}function l(e,t){let n=t.trim();if(n===``)return e;let r=n.toLowerCase();return[n,...e.filter(e=>e.toLowerCase()!==r)].slice(0,3)}var u;(function(e){e.RCL=`R`,e.CEL=`C`})(u||={}
vendor: 13,121 bytes, lines 1-2
1),Object.freeze({[u.RCL]:`RCL`,[u.CEL]:`CEL`});var d=globalThis,ee=d.ShadowRoot&&(d.ShadyCSS===void 0||d.ShadyCSS.nativeShadow)&&`adoptedStyleSheets`in Document.prototype&&`replace`in CSSStyleSheet.prototype,te=Symbol(),ne=new WeakMap,re=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==te)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ee&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ne.set(t,e))}return e}toString(){return this.cssText}},ie=e=>new re(typeof e==`string`?e:e+``,void 0,te),ae=(e,t)=>{if(ee)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement(`style`),r=d.litNonce;r!==void 0&&t.setAttribute(`nonce`,r),t.textContent=n.cssText,e.appendChild(t)}},oe=ee?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return ie(t)})(e):e,{is:se,defineProperty:ce,getOwnPropertyDescriptor:le,getOwnPropertyNames:ue,getOwnPropertySymbols:de,getPrototypeOf:fe}=Object,f=globalThis,pe=f.trustedTypes,me=pe?pe.emptyScript:``,he=f.reactiveElementPolyfillSupport,p=(e,t)=>e,m={toAttribute(e,t){switch(t){case Boolean:e=e?me:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},ge=(e,t)=>!se(e,t),_e={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:ge};Symbol.metadata??=Symbol(`metadata`),f.litPropertyMetadata??=new WeakMap;var h=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_e){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&ce(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=le(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_e}static _$Ei(){if(this.hasOwnProperty(p(`elementProperties`)))return;let e=fe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(p(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(p(`properties`))){let e=this.properties,t=[...ue(e),...de(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(oe(e))}else e!==void 0&&t.push(oe(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ae(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?m:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?m:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??ge)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};h.elementStyles=[],h.shadowRootOptions={mode:`open`},h[p(`elementProperties`)]=new Map,h[p(`finalized`)]=new Map,he?.({ReactiveElement:h}),(f.reactiveElementVersions??=[]).push(`2.1.2`);var ve=globalThis,ye=e=>e,g=ve.trustedTypes,be=g?g.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,xe=`$lit$`,_=`lit$${Math.random().toFixed(9).slice(2)}$`,Se=`?`+_,Ce=`<${Se}>`,v=document,y=()=>v.createComment(``),b=e=>e===null||typeof e!=`object`&&typeof e!=`function`,we=Array.isArray,Te=e=>we(e)||typeof e?.[Symbol.iterator]==`function`,x=`[ 2\f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ee=/-->/g,De=/>/g,C=RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),Oe=/'/g,ke=/"/g,Ae=/^(?:script|style|textarea|title)$/i,je=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),w=je(1),T=je(2),E=Symbol.for(`lit-noChange`),D=Symbol.for(`lit-nothing`),Me=new WeakMap,O=v.createTreeWalker(v,129);function Ne(e,t){if(!we(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return be===void 0?t:be.createHTML(t)}var Pe=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=S;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===S?c[1]===`!--`?o=Ee:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=C):(Ae.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=C):o=De:o===C?c[0]===`>`?(o=i??S,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?C:c[3]===`"`?ke:Oe):o===ke||o===Oe?o=C:o===Ee||o===De?o=S:(o=C,i=void 0);let d=o===C&&e[t+1].startsWith(`/>`)?` `:``;a+=o===S?n+Ce:l>=0?(r.push(s),n.slice(0,l)+xe+n.slice(l)+_+d):n+_+(l===-2?t:d)}return[Ne(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]},Fe=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Pe(t,n);if(this.el=e.createElement(l,r),O.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=O.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(xe)){let t=u[o++],n=i.getAttribute(e).split(_),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Re:r[1]===`?`?ze:r[1]===`@`?Be:A}),i.removeAttribute(e)}else e.startsWith(_)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(Ae.test(i.tagName)){let e=i.textContent.split(_),t=e.length-1;if(t>0){i.textContent=g?g.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],y()),O.nextNode(),c.push({type:2,index:++a});i.append(e[t],y())}}}else if(i.nodeType===8)if(i.data===Se)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(_,e+1))!==-1;)c.push({type:7,index:a}),e+=_.length-1}a++}}static createElement(e,t){let n=v.createElement(`template`);return n.innerHTML=e,n}};function k(e,t,n=e,r){if(t===E)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=b(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(e),i._$AT(e,n,r)),r===void 0?n._$Cl=i:(n._$Co??=[])[r]=i),i!==void 0&&(t=k(e,i._$AS(e,t.values),i,r)),t}var Ie=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??v).importNode(t,!0);O.currentNode=r;let i=O.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new Le(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new Ve(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=O.nextNode(),a++)}return O.currentNode=v,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings===void 0?n._$AI(e[t]):(n._$AI(e,n,t),t+=n.strings.length-2)),t++}},Le=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),b(e)?e===D||e==null||e===``?(this._$AH!==D&&this._$AR(),this._$AH=D):e!==this._$AH&&e!==E&&this._(e):e._$litType$===void 0?e.nodeType===void 0?Te(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==D&&b(this._$AH)?this._$AA.nextSibling.data=e:this.T(v.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Fe.createElement(Ne(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new Ie(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Me.get(e.strings);return t===void 0&&Me.set(e.strings,t=new Fe(e)),t}k(t){we(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(y()),this.O(y()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=ye(e).nextSibling;ye(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},A=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=D,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||n[0]!==``||n[1]!==``?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=D}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=k(this,e,t,0),a=!b(e)||e!==this._$AH&&e!==E,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=k(this,r[n+o],t,o),s===E&&(s=this._$AH[o]),a||=!b(s)||s!==this._$AH[o],s===D?e=D:e!==D&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Re=class extends A{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===D?void 0:e}},ze=class extends A{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==D)}},Be=class extends A{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}
2_$AI(e,t=this){if((e=k(this,e,t,0)??D)===E)return;let n=this._$AH,r=e===D&&n!==D||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==D&&(n===D||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ve=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){k(this,e)}},He=ve.litHtmlPolyfillSupport;He?.(Fe,Le),(ve.litHtmlVersions??=[]).push(`3.3.3`);var Ue=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new Le(t.insertBefore(y(),e),e,void 0,n??{})}return i._$AI(e),i},We=globalThis,j=class extends h{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ue(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}};j._$litElement$=!0,j.finalized=!0,We.litElementHydrateSupport?.({LitElement:j});var Ge=We.litElementPolyfillSupport;Ge?.({LitElement:j}),(We.litElementVersions??=[]).push(`4.2.2`);var Ke={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:ge},qe=(e=Ke,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function M(e){return(t,n)=>typeof n==`object`?qe(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function N(e){return M({...e,state:!0,attribute:!1})}var Je=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function P(e,t){return(n,r,i)=>{let a=t=>t.renderRoot?.querySelector(e)??null;if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return Je(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return Je(n,r,{get(){return a(this)}})}}var Ye=`search-bar-expanded`,Xe=`.global-nav-right-menu.search-bar-expanded > li:not(#global-nav-search-button) { 3display: none !important; 4} 5 6.global-nav-left-menu .global-nav-header-option:nth-child(5) { 7anchor-name: --last-nav-btn; 8} 9 10.header-site-refresh-container search-bar :focus, 11.header-site-refresh-container search-bar button:focus { 12outline: none !important; 13outline-color: transparent !important; 14} 15.header-site-refresh-container search-bar button[type="submit"]:focus-visible { 16outline: 4px solid var(--palette-button-stroke-light-focus-default) !important; 17outline-offset: 4px !important; 18} 19.header-transparent .header-site-refresh-container search-bar button[type="submit"]:focus-visible, 20.header-site-refresh-container .header-transparent search-bar button[type="submit"]:focus-visible { 21outline: 4px solid var(--palette-button-stroke-dark-focus-default) !important; 22outline-offset: 4px !important; 23} 24.header-site-refresh-container search-bar button[type="button"]:focus-visible { 25outline: 4px solid var(--palette-button-stroke-light-focus-default) !important; 26outline-offset: -10px !important; 27border-radius: var(--border-radius-xxl) !important; 28} 29.header-transparent .header-site-refresh-container search-bar button[type="button"]:focus-visible, 30.header-site-refresh-container .header-transparent search-bar button[type="button"]:focus-visible { 31outline: 4px solid var(--palette-button-stroke-dark-focus-default) !important; 32outline-offset: -10px !important; 33border-radius: var(--border-radius-xxl) !important; 34} 35.header-site-refresh-container .cel-site-refresh search-bar button[type="button"]:focus-visible { 36border-radius: 0 !important; 37} 38.header-site-refresh-container search-bar [data-focused] { 39outline: 4px solid var(--palette-stroke-light-border-focus) !important; 40outline-offset: -4px !important; 41border-radius: var(--border-radius-l) !important; 42} 43.header-site-refresh-container search-bar [data-active] { 44outline: 4px solid var(--palette-stroke-light-border-focus) !important; 45outline-offset: -4px !important; 46border-radius: var(--border-radius-l) !important; 47}`;function F(e){if(typeof document>`u`)return null;let t=`; ${document.cookie}`.split(`; ${e}=`);if(t.length===2){let e=t.pop();return e?e.split(`;`).shift()??null:null}return null}function I(){return(F(`language`)||F(`lang`)||`en`).toLowerCase()}function L(){return(F(`country`)||F(`wuc`)||`US`).toUpperCase()}function Ze(e){return typeof e==`object`&&!!e&&`text`in e&&typeof e.text==`string`&&`category`in e&&typeof e.category==`string`}var Qe=3600*1e3;function $e(e,t){return`${e.storageKeyPrefix}:${e.cacheKeySlug}:${t.brand}:${t.countryCode}:${t.language}`}function et(e){let t=new Map,n=new Map;function r(t){return $e(e,t)}function i(e){try{let t=localStorage.getItem(e);if(!t)return null;let n=JSON.parse(t);return Date.now()-n.timestamp>Qe?(localStorage.removeItem(e),null):n.items}catch{return null}}
47function a(t,n){try{let e={items:n,timestamp:Date.now()};localStorage.setItem(t,JSON.stringify(e))}catch(t){console.warn(`${e.logPrefix} Failed to save to localStorage:`,t)}}async function o(t){try{let n=`${t.baseUrl??``}${e.apiPath}?countryCode=${t.countryCode}&language=${t.language}`,r=await fetch(n,{headers:t.brand?{brand:t.brand}:void 0});if(!r.ok)return console.error(`${e.logPrefix} Fetch failed: ${r.status} ${r.statusText}`),[];let i=await r.json();return typeof i!=`object`||!i||!(`items`in i)||!Array.isArray(i.items)?(console.error(`${e.logPrefix} Invalid response shape: expected { items: Array }, got:`,i),[]):i.items.filter(Ze)}catch(t){return t instanceof DOMException&&t.name===`AbortError`||console.error(`${e.logPrefix} Network error:`,t),[]}}return{preload({initial:s,...c}){if(!c.brand)return;let l=r(c);if(s!==void 0){t.set(l,s);return}if(t.has(l)||n.has(l))return;let u=i(l);if(u){t.set(l,u);return}let d=(async()=>{try{let e=await o(c);n.has(l)&&(t.set(l,e),a(l,e))}catch(r){console.warn(`${e.logPrefix} Network error:`,r),n.has(l)&&t.set(l,[])}finally{n.delete(l)}})();n.set(l,d)},getCached(e){return t.get(r(e))??[]},isLoaded(e){return t.has(r(e))},clear(){t.clear(),n.clear()},fetch:o}}var{preload:R,getCached:tt,isLoaded:nt,clear:rt,fetch:it}=et({storageKeyPrefix:`cc-ss`,cacheKeySlug:`popular`,apiPath:`/search/trending`,logPrefix:`[popular-searches]`}),{preload:at,getCached:ot,isLoaded:st,clear:ct,fetch:lt}=et({storageKeyPrefix:`cc-ss`,cacheKeySlug:`suggestions`,apiPath:`/intelligence/api/v2/search/suggestions`,logPrefix:`[suggestions]`}),ut=Object.freeze(new Set),dt=new WeakMap;function ft(e){return e.toLowerCase().split(/[\s,/()]+/).filter(Boolean)}function pt(e){let t={children:new Map,items:new Set};for(let n of e)for(let e of ft(n.text)){let r=t;for(let t of e){let e=r.children.get(t);e||(e={children:new Map,items:new Set},r.children.set(t,e)),r=e,r.items.add(n)}}return t}function mt(e,t){let n=e;for(let e of t){let t=n.children.get(e);if(!t)return ut;n=t}return n.items}function ht(e,t){let n=0;for(let r=0;r<t.length&&n<e.length;r++)e[n]===t[r]&&n++;return n===e.length}function gt(e){let t=dt.get(e);if(t)return t;let n=pt(e);return dt.set(e,n),n}function _t(e,t){let n=t.toLowerCase().trim();if(!n)return[];let r=gt(e),i=new Map;for(let e of mt(r,n))i.set(e,2);for(let t of e)t.text.toLowerCase().startsWith(n)&&i.set(t,3);for(let t of e)if(!i.has(t)){let e=t.text.toLowerCase();(e.includes(n)||ht(n,e))&&i.set(t,1)}return[...i.entries()].sort((e,t)=>t[1]-e[1]).slice(0,5).map(([e])=>e)}function vt(e){return new URLSearchParams(e).get(`q`)??``}function yt(e){let t=e.split(`/`).filter(Boolean);return t.length>=2?`/${t[0]}/${t[1]}/search`:`/search`}function bt(e){let t=e.replace(/\/+$/,``);return t===`/search`||t.endsWith(`/search`)}function xt(){let e=globalThis.matchMedia(`(prefers-reduced-motion: reduce)`).matches;globalThis.scrollTo({top:0,behavior:e?`auto`:`smooth`})}var St=`rcl-site-refresh`,Ct=`cel-site-refresh`,wt=Object.freeze({[u.CEL]:Ct,[u.RCL]:St});function Tt(e){return wt[e]}var Et=[`cel`,`0.0.0.0`];function Dt(e){return Et.some(t=>e.includes(t))?u.CEL:u.RCL}var Ot={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},kt=e=>(...t)=>({_$litDirective$:e,values:t}),At=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},jt=class extends At{constructor(e){if(super(e),this.it=D,e.type!==Ot.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===D||e==null)return this._t=void 0,this.it=e;if(e===E)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};jt.directiveName=`unsafeHTML`,jt.resultType=1;var Mt=kt(jt),Nt=`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16" aria-hidden="true">
47<path fill="currentColor" fill-rule="evenodd" d="M4.832 2.237a.81.81 0 0 0 0 1.147L9.448 8l-4.616 4.616a.81.81 0 1 0 1.147 1.146l5.19-5.189a.81.81 0 0 0 0-1.146l-5.19-5.19a.81.81 0 0 0-1.147 0" clip-rule="evenodd"/></svg>`,Pt=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z" fill="currentColor" /></svg>`;Ft();function Ft(e=24){return` 48 <svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${e}" viewBox="0 0 24 24" fill="none" aria-hidden="true"> 49 <path 50 fill="currentColor" 51 fill-rule="evenodd" 52 d="M11.0732 1.82324C5.96463 1.82324 1.82324 5.96463 1.82324 11.0732C1.82324 16.1819 5.96463 20.3232 11.0732 20.3232C13.3576 20.3232 15.4485 19.4952 17.0623 18.1228L20.8965 21.9571C21.1894 22.25 21.6643 22.25 21.9572 21.9571C22.2501 21.6642 22.2501 21.1893 21.9572 20.8964L18.123 17.0622C19.4952 15.4484 20.3232 13.3575 20.3232 11.0732C20.3232 5.96463 16.1819 1.82324 11.0732 1.82324ZM3.32324 11.0732C3.32324 6.79306 6.79306 3.32324 11.0732 3.32324C15.3534 3.32324 18.8232 6.79306 18.8232 11.0732C18.8232 15.3534 15.3534 18.8232 11.0732 18.8232C6.79306 18.8232 3.32324 15.3534 3.32324 11.0732Z" 53 clip-rule="evenodd" 54 /> 55 </svg> 56 `}function z(e=24){return w`${Mt(Ft(e))}`}function It(){return w`${Mt(Pt)}`}function Lt(e=16){return T`<svg 57 xmlns="http://www.w3.org/2000/svg" 58 width="${e}" 59 height="${e}" 60 viewBox="0 0 16 16" 61 fill="none" 62 aria-hidden="true" 63 > 64 <path 65 fill="currentColor" 66 d="M8.62784 4.00006C8.62788 3.65488 8.34808 3.37503 8.0029 3.375C7.65773 3.37497 7.37788 3.65476 7.37784 3.99994L7.37744 8.00287C7.37742 8.16865 7.44327 8.32765 7.5605 8.44488L10.387 11.2713C10.631 11.5154 11.0268 11.5154 11.2709 11.2713C11.5149 11.0273 11.5149 10.6315 11.2709 10.3875L8.62747 7.74408L8.62784 4.00006Z" 67 /> 68 <path 69 fill="currentColor" 70 fill-rule="evenodd" 71 d="M7.99992 0.708252C3.97284 0.708252 0.708252 3.97284 0.708252 7.99992C0.708252 12.027 3.97284 15.2916 7.99992 15.2916C12.027 15.2916 15.2916 12.027 15.2916 7.99992C15.2916 3.97284 12.027 0.708252 7.99992 0.708252ZM1.95825 7.99992C1.95825 4.6632 4.6632 1.95825 7.99992 1.95825C11.3366 1.95825 14.0416 4.6632 14.0416 7.99992C14.0416 11.3366 11.3366 14.0416 7.99992 14.0416C4.6632 14.0416 1.95825 11.3366 1.95825 7.99992Z" 72 clip-rule="evenodd" 73 /> 74 </svg>`}function Rt(){return w`${Mt(Nt)}`}function zt(e=15,t){return t===u.CEL?T`<svg 75 xmlns="http://www.w3.org/2000/svg" 76 width="${e}" 77 height="${Math.round(e*14.0029/10.0293)}" 78 viewBox="0 0 10.0293 14.0029" 79 fill="none" 80 aria-hidden="true" 81 > 82 <path 83 fill="currentColor" 84 d="M8.7793 9.17285C8.77928 8.75879 8.6223 8.15906 8.35742 7.54395C8.23538 7.26055 8.0975 6.99345 7.95801 6.75781C7.49046 7.38862 7.0355 7.81628 6.54297 8.00488C5.76553 8.30241 5.1177 7.95041 4.62598 7.56055L4.16309 7.19336L4.50391 6.70996C5.09629 5.86981 5.13901 4.8475 4.91504 3.89551C4.85747 3.65083 4.78366 3.41946 4.70215 3.20605C4.276 4.36023 3.4913 5.17782 2.87793 5.77344L2.52637 6.11426C1.75117 6.87754 1.25002 8.10385 1.25 9.17285C1.25 11.1253 2.91005 12.7529 5.01465 12.7529C7.11913 12.7528 8.7793 11.1252 8.7793 9.17285ZM10.0293 9.17285C10.0293 11.8656 7.75835 14.0028 5.01465 14.0029C2.27083 14.0029 0 11.8657 0 9.17285C1.8806e-05 7.77507 0.631294 6.22611 1.64941 5.22363V5.22266C2.59004 4.29845 3.7627 3.28675 3.7627 1.46387V0L4.81934 1.0127C5.2942 1.46762 5.86383 2.47032 6.13184 3.60938C6.36233 4.5892 6.38906 5.76324 5.86426 6.84961C5.9611 6.8744 6.03093 6.8617 6.0957 6.83691C6.34104 6.74298 6.75816 6.38789 7.41016 5.33887L7.8418 4.64453L8.39844 5.24316C8.80913 5.68519 9.20906 6.36285 9.50488 7.0498C9.79885 7.73249 10.0293 8.5134 10.0293 9.17285Z" 85 /> 86 </svg>`:T`<svg 87 xmlns="http://www.w3.org/2000/svg" 88 width="${e}" 89 height="${Math.round(e*14.0087/10.9697)}"
90 viewBox="0 0 10.9697 14.0087" 91 fill="none" 92 aria-hidden="true" 93 > 94 <path 95 fill="currentColor" 96 d="M9.71973 8.72845C9.71973 8.31093 9.57984 7.72988 9.33691 7.11614C9.16911 6.69223 8.96187 6.28284 8.74902 5.93548C8.23858 6.63979 7.74629 7.1223 7.21777 7.34661C6.50626 7.64844 5.87954 7.43435 5.36426 7.08782C4.90583 6.77937 4.88349 6.20719 5.10352 5.84075C5.57389 5.05733 5.65797 4.15512 5.52148 3.28118C5.44587 2.79715 5.30223 2.33692 5.13477 1.93353C4.5961 3.55042 3.39951 4.59048 2.68262 5.29485C1.81162 6.1528 1.25 7.5275 1.25 8.72845C1.25 10.9296 3.12019 12.7585 5.48438 12.7587C7.84874 12.7587 9.71972 10.9298 9.71973 8.72845ZM10.9697 8.72845C10.9697 11.6702 8.48796 14.0087 5.48438 14.0087C2.48096 14.0085 4.82603e-06 11.67 0 8.72845C0 7.19846 0.692393 5.50036 1.80664 4.40325L2.5293 3.69036C3.25745 2.94323 3.94891 2.06548 4.12402 0.808526L4.15137 0.677666C4.23515 0.380688 4.45492 0.141861 4.74512 0.0448537C5.06047 -0.0605156 5.41661 0.0201013 5.65527 0.283135L5.75 0.407158L5.90625 0.664971C6.26886 1.29985 6.61 2.1544 6.75586 3.08782C6.9087 4.06622 6.84963 5.16985 6.33203 6.19622C6.49337 6.25878 6.60961 6.2461 6.72949 6.19524C6.99268 6.0834 7.3983 5.73499 7.99121 4.83685L8.05371 4.75286C8.37076 4.37865 8.99242 4.26828 9.39258 4.67962L9.47461 4.77532L9.61816 4.97454C9.9497 5.45686 10.2605 6.05355 10.499 6.65618C10.7685 7.33697 10.9697 8.08607 10.9697 8.72845Z" 97 /> 98 </svg>`}function Bt(e){return e===u.CEL?T`<svg 99 xmlns="http://www.w3.org/2000/svg" 100 width="16" 101 height="16" 102 viewBox="4.5 4.5 15 15" 103 fill="currentColor" 104 aria-hidden="true" 105 > 106 <rect 107 x="4.5" 108 y="4.5" 109 width="15" 110 height="15" 111 /> 112 </svg>`:T`<svg 113 xmlns="http://www.w3.org/2000/svg" 114 width="16" 115 height="16" 116 viewBox="4.5 4.5 15 15" 117 fill="currentColor" 118 aria-hidden="true" 119 > 120 <path 121 fill-rule="evenodd" 122 d="M4.5 7.5a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3h-9a3 3 0 0 1-3-3v-9Z" 123 clip-rule="evenodd" 124 /> 125 </svg>`}function Vt(e=16){return T`<svg 126 xmlns="http://www.w3.org/2000/svg" 127 width="${e}" 128 height="${e}" 129 viewBox="0 0 24 24" 130 fill="none" 131 aria-hidden="true" 132 > 133 <circle 134 cx="12" 135 cy="12" 136 r="10" 137 stroke="currentColor" 138 stroke-width="3" 139 stroke-linecap="round" 140 stroke-dasharray="150, 200" 141 stroke-dashoffset="-100" 142 opacity="0.25" 143 /> 144 <circle 145 cx="12" 146 cy="12" 147 r="10" 148 stroke="currentColor" 149 stroke-width="3" 150 stroke-linecap="round" 151 stroke-dasharray="40, 200" 152 opacity="0.75" 153 /> 154 </svg>`}function Ht(e,t){return e.length===0?-1:t+1>=e.length?0:t+1}function Ut(e,t){return e.length===0?-1:t-1<0?e.length-1:t-1}function B(e,t){e.forEach((e,n)=>{e.setAttribute(`tabindex`,n===t?`0`:`-1`),n===t?(e.setAttribute(`data-focused`,``),e.focus({preventScroll:!0})):e.removeAttribute(`data-focused`)})}var V={SHIP:`searchResults.suggestions.category.ship`,SHIP_CLASS:`searchResults.suggestions.category.shipClass`,DESTINATION:`searchResults.suggestions.category.destination`,ACTIVITY:`searchResults.suggestions.category.activity`,DINING:`searchResults.suggestions.category.dining`,EXPERIENCE:`searchResults.suggestions.category.experience`,ROOM_TYPE:`searchResults.suggestions.category.roomType`,GENERAL:`searchResults.suggestions.category.general`,GUIDE:`searchResults.suggestions.category.guide`,POLICY:`searchResults.suggestions.category.policy`,SERVICES:`searchResults.suggestions.category.services`,BARS:`searchResults.suggestions.category.bars`,ENTERTAINMENT:`searchResults.suggestions.category.entertainment`,POOLS:`searchResults.suggestions.category.pools`,RETAIL:`searchResults.suggestions.category.retail`,KIDS:`searchResults.suggestions.category.kids`,SHIP_OVERVIEW:`searchResults.suggestions.category.shipOverview`,FLEET_COMPARISON:`searchResults.suggestions.category.fleetComparison`,CATEGORY_DISCOVERY:`searchResults.suggestions.category.categoryDiscovery`},H=`_1d1gqzi0`,Wt=`_1d1gqzi1`,Gt=`_1d1gqzi2`,Kt={simple:`_1d1gqzi4 _1d1gqzi3`,suggestion:`_1d1gqzi5 _1d1gqzi3`},qt={small:`_1d1gqzi6`,large:`_1d1gqzi7`},Jt=`_1d1gqzi8`,U={primary:`_1d1gqzi9`,secondary:`_1d1gqzia`}
154,Yt=`_1d1gqzib`;function W(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Xt=t({PopularSearches:()=>G,arePopularSearchesLoaded:()=>nt,getCachedPopularSearches:()=>tt,preloadPopularSearches:()=>R}),Zt=`search-bar-popular-searches-listbox`,G=class extends j{constructor(...e){super(...e),this.items=[],this.dictionary={},this.brand=null,this.focusedIndex=-1}createRenderRoot(){return this}focusFirst(){this.items.length!==0&&this.updateComplete.then(()=>{this.focusItem(0)})}focusLast(){this.items.length!==0&&this.updateComplete.then(()=>{this.focusItem(this.items.length-1)})}getItemCount(){return this.items.length}isLastItemFocused(){return this.focusedIndex===this.items.length-1}isFirstItemFocused(){return this.focusedIndex===0}clearFocus(){this.getAllItems().forEac
154h(e=>{e.setAttribute(`tabindex`,`-1`),e.removeAttribute(`data-focused`)}),this.focusedIndex=-1}render(){return this.items.length===0?D:w` 155 <div class=${H}> 156 <div class=${Gt} aria-hidden="true"> 157 ${this.dictionary[`searchResults.popularSearches.title`]??`searchResults.popularSearches.title`} 158 </div> 159 <ul 160 id=${Zt} 161 role="listbox" 162 class=${Wt} 163 data-testid="popular-searches-listbox" 164 aria-label=${this.dictionary[`searchResults.popularSearches.title`]??`Popular searches`} 165 @keydown=${this.handleKeyDown} 166 > 167 ${this.items.map((e,t)=>this.renderItem(e,t))} 168 </ul> 169 </div> 170 `}renderItem(e,t){return w` 171 <li 172 id="popular-search-option-${t}" 173 role="option" 174 class=${Kt.suggestion} 175 data-testid="popular-search-item-${t}" 176 tabindex="${t===this.focusedIndex||this.focusedIndex===-1&&t===0?`0`:`-1`}" 177 aria-selected="${t===this.focusedIndex?`true`:`false`}" 178 @click=${()=>this.handleItemClick(e)} 179 > 180 <span class=${qt.large} aria-hidden="true" 181 >${e.trending?zt(15,this.brand):z(20)}</span 182 > 183 <span class=${Jt}> 184 <span class=${U.primary} data-testid="popular-search-item-${t}-text" 185 >${e.text}</span 186 > 187 <span class=${U.secondary} data-testid="popular-search-item-${t}-category"> 188 ${this.dictionary[V[e.category]]??V[e.category]} 189 </span> 190 </span> 191 ${e.trending?w` 192 <span 193 class=${Yt} 194 aria-hidden="true" 195 data-testid="popular-search-item-${t}-hot-badge" 196 > 197 ${this.brand?zt(12,this.brand):D} 198 <span>${this.dictionary[`searchResults.popularSearches.hotBadge`]??`Hot`}</span> 199 </span> 200 `:D} 201 </li> 202 `}handleKeyDown(e){let t=this.getAllItems();if(t.length!==0){if(e.key===`ArrowDown`&&(e.preventDefault(),this.focusedIndex<this.items.length-1)){e.stopPropagation();let n=Ht(t,this.focusedIndex);this.focusedIndex=n,B(t,n)}if(e.key===`ArrowUp`&&(e.preventDefault(),this.focusedIndex>0)){e.stopPropagation();let n=Ut(t,this.focusedIndex);this.focusedIndex=n,B(t,n)}if((e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.focusedIndex>=0&&this.focusedIndex<this.items.length)){let e=this.items[this.focusedIndex];e&&this.handleItemClick(e)}}}handleItemClick(e){this.dispatchEvent(new CustomEvent(`item-selected`,{detail:{query:e.text},bubbles:!0,composed:!0}))}focusItem(e){let t=this.getAllItems();t.length!==0&&(this.focusedIndex=e,B(t,e))}getAllItems(){return this.listboxEl?Array.from(this.listboxEl.querySelectorAll(`[role="option"]`)):[]}};W([M({type:Array})],G.prototype,`items`,void 0),W([M({type:Object})],G.prototype,`dictionary`,void 0),W([M({type:String})],G.prototype,`brand`,void 0),W([N()],G.prototype,`focusedIndex`,void 0),W([P(`#${Zt}`)],G.prototype,`listboxEl`,void 0),customElements.get(`popular-searches`)||customElements.define(`popular-searches`,G);var Qt=t({RecentSearches:()=>K}),$t=`search-bar-recent-searches-listbox`,K=class extends j{constructor(...e){super(...e),this.searches=[],this.dictionary={},this.focusedIndex=-1}createRenderRoot(){return this}focusFirst(){this.searches.length!==0&&this.updateComplete.then(()=>{this.focusItem(0)})}focusLast(){this.searches.length!==0&&this.updateComplete.then(()=>{this.focusItem(this.searches.length-1)})}getItemCount(){return this.searches.length}isLastItemFocused(){return this.focusedIndex===this.searches.length-1}isFirstItemFocused(){return this.focusedIndex===0}
202clearFocus(){this.getAllItems().forEach(e=>{e.setAttribute(`tabindex`,`-1`),e.removeAttribute(`data-focused`)}),this.focusedIndex=-1}render(){return this.searches.length===0?D:w` 203 <div class=${H}> 204 <div class=${Gt} aria-hidden="true"> 205 ${this.dictionary[`searchResults.recentSearches.title`]??`searchResults.recentSearches.title`} 206 </div> 207 <ul 208 id=${$t} 209 role="listbox" 210 class=${Wt} 211 data-testid="recent-searches-listbox" 212 aria-label=${this.dictionary[`searchResults.recentSearches.title`]??`Recent searches`} 213 @keydown=${this.handleKeyDown} 214 > 215 ${this.searches.map((e,t)=>this.renderItem(e,t))} 216 </ul> 217 </div> 218 `}renderItem(e,t){return w` 219 <li 220 id="recent-search-option-${t}" 221 role="option" 222 class=${Kt.simple} 223 data-testid="recent-search-item-${t}" 224 tabindex="${t===this.focusedIndex||this.focusedIndex===-1&&t===0?`0`:`-1`}" 225 aria-selected="${t===this.focusedIndex?`true`:`false`}" 226 @click=${()=>this.handleItemClick(e)} 227 > 228 <span class=${qt.small} aria-hidden="true">${Lt(16)}</span> 229 <span class=${U.primary}>${e}</span> 230 </li> 231 `}handleKeyDown(e){let t=this.getAllItems();if(t.length!==0){if(e.key===`ArrowDown`&&(e.preventDefault(),this.focusedIndex<this.searches.length-1)){e.stopPropagation();let n=Ht(t,this.focusedIndex);this.focusedIndex=n,B(t,n)}if(e.key===`ArrowUp`&&(e.preventDefault(),this.focusedIndex>0)){e.stopPropagation();let n=Ut(t,this.focusedIndex);this.focusedIndex=n,B(t,n)}if((e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.focusedIndex>=0&&this.focusedIndex<this.searches.length)){let e=this.searches[this.focusedIndex];e&&this.handleItemClick(e)}}}handleItemClick(e){this.dispatchEvent(new CustomEvent(`item-selected`,{detail:{query:e},bubbles:!0,composed:!0}))}focusItem(e){let t=this.getAllItems();t.length!==0&&(this.focusedIndex=e,B(t,e))}getAllItems(){return this.listboxEl?Array.from(this.listboxEl.querySelectorAll(`[role="option"]`)):[]}};W([M({type:Array})],K.prototype,`searches`,void 0),W([M({type:Object})],K.prototype,`dictionary`,void 0),W([N()],K.prototype,`focusedIndex`,void 0),W([P(`#${$t}`)],K.prototype,`listboxEl`,void 0),customElements.get(`recent-searches`)||customElements.define(`recent-searches`,K);var en=t({SuggestionsList:()=>q}),tn=`search-bar-suggestions-listbox`,q=class extends j{constructor(...e){super(...e),this.items=[],this.query=``,this.dictionary={},this.focusedIndex=-1}createRenderRoot(){return this}focusFirst(){this.items.length!==0&&this.updateComplete.then(()=>{this.focusItem(0)})}focusLast(){this.items.length!==0&&this.updateComplete.then(()=>{this.focusItem(this.items.length-1)})}getItemCount(){return this.items.length}isLastItemFocused(){return this.focusedIndex===this.items.length-1}isFirstItemFocused(){return this.focusedIndex===0}
231clearFocus(){this.getAllItems().forEach(e=>{e.setAttribute(`tabindex`,`-1`),e.removeAttribute(`data-focused`)}),this.focusedIndex=-1}render(){return this.items.length===0?D:w` 232 <div class=${H}> 233 <div class=${Gt} aria-hidden="true"> 234 ${this.dictionary[`searchResults.suggestions.title`]??`searchResults.suggestions.title`} 235 </div> 236 <ul 237 id=${tn} 238 role="listbox" 239 class=${Wt} 240 data-testid="suggestions-listbox" 241 aria-label=${this.dictionary[`searchResults.suggestions.title`]??`Suggestions`} 242 @keydown=${this.handleKeyDown} 243 > 244 ${this.items.map((e,t)=>this.renderItem(e,t))} 245 </ul> 246 </div> 247 `}renderItem(e,t){return w` 248 <li 249 id="suggestion-item-${t}" 250 role="option" 251 class=${Kt.suggestion} 252 data-testid="suggestion-item-${t}" 253 tabindex="${t===this.focusedIndex||this.focusedIndex===-1&&t===0?`0`:`-1`}" 254 aria-selected="${t===this.focusedIndex?`true`:`false`}" 255 @click=${()=>this.handleItemClick(e)} 256 > 257 <span class=${qt.large} aria-hidden="true">${z(20)}</span> 258 <span class=${Jt}> 259 <span class=${U.primary} data-testid="suggestion-item-${t}-text" 260 >${e.text}</span 261 > 262 <span class=${U.secondary} data-testid="suggestion-item-${t}-category"> 263 ${this.dictionary[V[e.category]]??V[e.category]} 264 </span> 265 </span> 266 </li> 267 `}handleKeyDown(e){let t=this.getAllItems();if(t.length!==0){if(e.key===`ArrowDown`&&(e.preventDefault(),this.focusedIndex<this.items.length-1)){e.stopPropagation();let n=Ht(t,this.focusedIndex);this.focusedIndex=n,B(t,n)}if(e.key===`ArrowUp`&&(e.preventDefault(),this.focusedIndex>0)){e.stopPropagation();let n=Ut(t,this.focusedIndex);this.focusedIndex=n,B(t,n)}if((e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.focusedIndex>=0&&this.focusedIndex<this.items.length)){let e=this.items[this.focusedIndex];e&&this.handleItemClick(e)}}}handleItemClick(e){this.dispatchEvent(new CustomEvent(`item-selected`,{detail:{query:e.text},bubbles:!0,composed:!0}))}focusItem(e){let t=this.getAllItems();t.length!==0&&(this.focusedIndex=e,B(t,e))}getAllItems(){return this.listboxEl?Array.from(this.listboxEl.querySelectorAll(`[role="option"]`)):[]}};W([M({type:Array})],q.prototype,`items`,void 0),W([M({type:String})],q.prototype,`query`,void 0),W([M({type:Object})],q.prototype,`dictionary`,void 0),W([N()],q.prototype,`focusedIndex`,void 0),W([P(`#${tn}`)],q.prototype,`listboxEl`,void 0),customElements.get(`suggestions-list`)||customElements.define(`suggestions-list`,q);var nn=`_147sjh40`,rn=`_147sjh41`,an=`_147sjh44`,J=`_147sjh45`,on=`_1ix54qo0`,sn=`_1qkzuhs0`,cn=`_1qkzuhs1`,ln=`_1qkzuhs2`,un=`_1qkzuhs3`,dn=`_1qkzuhs4`,fn=`_1qkzuhs5`,pn=`s314o01`,mn=`_1rynq472`,hn=`_1rynq473 _1rynq471`,gn=`_1rynq474 _1rynq471`,_n=`_1rynq475 _1rynq471`,vn=`_1rynq476 _1rynq471`,yn=`dxs8x0`,bn=`dxs8x1`,xn=`dxs8x2`,Sn=`dxs8x3`,Cn=`dxs8x4`,wn=`/search/bar/dictionary`,Tn=`search-bar-dictionary`,Y={},X=!1,Z=!1,En=new Set;function Dn(e){return typeof e!=`object`||!e||Array.isArray(e)?!1:Object.values(e).every(e=>typeof e==`string`)}function On(){return Y}function kn(){return X}function An(e){return En.add(e),()=>{En.delete(e)}}function jn(){En.forEach(e=>{e(Y)})}function Mn(){try{let e=sessionStorage.getItem(Tn);if(e){let t=JSON.parse(e);Dn(t)&&(Y=t,X=!0)}}catch{}}async function Nn({initial:e}={}){if(e!==void 0){if(X)return;Y=e,X=!0,Z=!1;
267try{sessionStorage.setItem(Tn,JSON.stringify(Y))}catch{}jn();return}if(!(X||Z)){Z=!0;try{let e=await fetch(wn);if(!e.ok)console.error(`[dictionary] Fetch failed:`,e.status,e.statusText),Y={};else{let t=(await e.json())?.dictionary;if(Dn(t)){Y=t;try{sessionStorage.setItem(Tn,JSON.stringify(Y))}catch{}}else Y={}}}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;console.warn(`[dictionary] Network error:`,e),Y={}}finally{X=!0,Z=!1,jn()}}}var Pn=t({SearchBar:()=>Q}),Fn=!1;function In(){if(Fn)return;Fn=!0;let e=document.createElement(`style`);e.setAttribute(`data-source`,`search-bar-aem-focus-shield`),e.textContent=Xe,document.head.appendChild(e)}var Ln=new Set(Object.values(u));function Rn(e){return typeof e==`string`?Ln.has(e):!1}var zn=3,Bn=200,Q=class extends j{constructor(...e){super(...e),this.autofocus=!1,this.isLoading=!1,this.autoOpenDropdown=!1,this.compact=!1,this.query=``,this.widgetMode=!1,this.showRawKeys=!1,this.brand=null,this.isOnSearchPage=!1,this._dictionary={},this.isDropdownOpen=!1,this.searches=[],this.isFieldFocusVisible=!1,this.isUsingKeyboard=!1,this.handlePopState=()=>{if(this.widgetMode)return;let e=vt(globalThis.location.search).slice(0,500);this.query=e,this.isOnSearchPage=bt(globalThis.location.pathname),e&&this.onSearchRequest?.({query:e,fromHistory:!0})},this.handleStorageChange=e=>{(e.key===`site-search-recent`||e.key===null)&&(this.searches=s())},this.handlePointerDown=e=>{this.isUsingKeyboard=!1,this.isFieldFocusVisible=!1,this.contains(e.target)||(this.isDropdownOpen=!1)},this.handleDocumentKeyDown=e=>{e.key===`Tab`&&(this.isUsingKeyboard=!0)}}get themeClass(){return Rn(this.brand)?Tt(this.brand):``}get suggestionsParams(){return{brand:this.brand,countryCode:L(),language:I()}}get shouldShowRecentSearches(){return this.isDropdownOpen&&this.searches.length>0&&this.query.trim().length<zn}get shouldShowPopularSearches(){return this.isDropdownOpen&&(this.popularSearches!==void 0||nt({brand:this.brand,countryCode:L(),language:I()}))&&this.cachedPopularSearches.length>0&&this.query.trim().length<zn}get shouldShowSuggestions(){let e=this.filteredSuggestions();return this.isDropdownOpen&&(this.suggestions!==void 0||st(this.suggestionsParams))&&e.length>0}get shouldShowDropdown(){return this.shouldShowRecentSearches||this.shouldShowPopularSearches||this.shouldShowSuggestions}get cachedPopularSearches(){return this.popularSearches??tt({brand:this.brand,countryCode:L(),language:I()})}t(e){return this.showRawKeys?e:this._dictionary[e]??e}get isQueryEmpty(){return this.query.trim().length===0}get isHeaderOnSearchPage(){return this.widgetMode&&this.isOnSearchPage}filteredSuggestions(){let e=this.query.trim();return e.length<zn?[]:_t(this.suggestions??ot(this.suggestionsParams),e)}connectedCallback(){super.connectedCallback(),In(),this.classList.add(yn),this.brand=Dt(globalThis.location.hostname),this.showRawKeys=new URLSearchParams(globalThis.location.search).has(`showRawKeys`),this.widgetMode||(this.query=vt(globalThis.location.search).slice(0,500)),this.searches=s(),this.isOnSearchPage=bt(globalThis.location.pathname),Mn(),this._dictionary=this.dictionary??On(),this.unsubscribe=An(e=>{this._dictionary=e}),Nn({initial:this.dictionary}),at({...this.suggestionsParams,initial:this.suggestions}),R({brand:this.brand,countryCode:L(),language:I(),initial:this.popularSearches}),globalThis.addEventListener(`popstate`,this.handlePopState),globalThis.addEventListener(`storage`,this.handleStorageChange),document.addEventListener(`pointerdown`,this.handlePointerDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown)}firstUpdated(){this.autofocus&&this.inputEl?.focus()}updated(e){let t=e.has(`brand`),n=e.has(`locale`),r=e.has(`autoOpenDropdown`);e.has(`isLoading`)&&this.isLoading&&!this.widgetMode&&(this.query=vt(globalThis.location.search).slice(0,500)),t&&at(this.suggestionsParams),(t||n)&&R({brand:this.brand,countryCode:L(),language:I()}),r&&this.autoOpenDropdown&&this.isDictionaryReady&&this.updateComplete.then(()=>{setTimeout(()=>{this.isDropdownOpen=!0},Bn)}),e.has(`query`)&&!this.widgetMode&&this.resizeTextarea()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.(),globalThis.removeEventListener(`popstate`,this.handlePopState),globalThis.removeEventListener(`storage`,this.handleStorageChange),document.removeEventListener(`pointerdown`,this.handlePointerDown),document.removeEventListener(`ke
267ydown`,this.handleDocumentKeyDown)}createRenderRoot(){return this}get isDictionaryReady(){return this.showRawKeys||this.dictionary!==void 0||kn()}render(){return this.isDictionaryReady?this.isHeaderOnSearchPage?this.renderIconOnly():w` 268 <div class=${this.themeClass} style="width: 100%"> 269 <form class=${bn} data-testid="search-bar" @submit=${this.handleFormSubmit}> 270 ${this.renderSearchInput()} ${this.renderSearchButtons()} ${this.renderScreenReaderAnnouncements()} 271 </form> 272 </div> 273 `:this.renderSkeleton()}renderIconOnly(){return w` 274 <div class=${this.themeClass} style="width: 100%"> 275 <button 276 class=${on} 277 type="button" 278 data-testid="search-icon-button" 279 aria-label=${this.t(`searchResults.searchBar.label`)} 280 @click=${xt} 281 > 282 ${z(16)} 283 </button> 284 </div> 285 `}renderSkeleton(){return w` 286 <div class=${this.themeClass} style="width: 100%" aria-hidden="true"> 287 <form class=${bn}> 288 <div class=${xn}> 289 <div class=${Sn}> 290 <div class=${sn} data-empty="true"> 291 <div class=${mn}> 292 <div class=${hn}></div> 293 <div class=${gn}></div> 294 </div> 295 <span class=${fn}>${z()}</span> 296 </div> 297 </div> 298 </div> 299 <div class=${_n}></div> 300 <div class=${vn}></div> 301 </form> 302 </div> 303 `}renderSearchInput(){let e=this.query.length===0;return w` 304 <div class=${xn}> 305 <div class=${Sn} @blur=${this.handleWrapperBlur}> 306 <div 307 class=${sn} 308 data-testid="search-field" 309 ?data-empty=${e} 310 ?data-focus-visible=${this.isFieldFocusVisible} 311 > 312 <div class=${cn}> 313 <label class=${ln} for="search-bar-input"> 314 ${this.t(`searchResults.searchBar.label`)} 315 </label> 316 <textarea 317 id="search-bar-input" 318 class=${un} 319 data-testid="search-input" 320 ?autofocus=${this.autofocus} 321 autocomplete="off" 322 role="combobox" 323 rows="1" 324 maxlength=${500} 325 ?data-widget=${this.widgetMode} 326 .value=${this.query} 327 aria-haspopup="listbox" 328 aria-expanded=${this.shouldShowDropdown?`true`:`false`} 329 @input=${this.handleInput} 330 @focus=${this.handleInputFocus} 331 @blur=${this.handleInputBlur} 332 @click=${this.handleInputClick} 333 @keydown=${this.handleInputKeyDown} 334 ></textarea> 335 </div> 336 <button 337 class=${dn} 338 type="button" 339 aria-label=${this.t(`searchResults.searchBar.clearLabel`)} 340 data-testid="search-input-clear" 341 @click=${this.handleClear} 342 > 343 ${It()} 344 </button> 345 <span class=${fn}>${z()}</span> 346 </div> 347 ${this.shouldShowDropdown?this.renderDropdown():D} 348 </div> 349 </div> 350 `}renderDropdown(){return w` 351 <div class=${pn} @keydown=${this.handleDropdownKeyDown}> 352 ${this.shouldShowRecentSearches?this.renderRecentSearches():D} 353 ${this.shouldShowRecentSearches&&this.shouldShowPopularSearches?w`<div class=${Cn}></div>`:D} 354 ${this.shouldShowPopularSearches?this.renderPopularSearches():D} 355 ${this.shouldShowSuggestions?this.renderSuggestions():D} 356 </div> 357 `}renderRecentSearches(){return w` 358 <recent-searches 359 .searches=${this.searches} 360 .dictionary=${this._dictionary} 361 @item-selected=${this.handleItemSelected} 362 ></recent-searches> 363 `}renderPopularSearches(){return w` 364 <popular-searches 365 .items=${this.cachedPopularSearches} 366 .dictionary=${this._dictionary} 367 @item-selected=${this.handleItemSelected} 368 ></popular-searches> 369 `}renderSuggestions(){return w` 370 <suggestions-list 371 .items=${this.filteredSuggestions()} 372 .query=${this.query} 373 .dictionary=${this._dictionary} 374 @item-selected=${this.handleItemSelected} 375 ></suggestions-list> 376 `}renderDesktopButtonContent(){return this.isLoading&&!this.widgetMode?w`<span class=${J}>${Bt(this.brand)}</span> ${this.t(`searchResults.searchBar.stop`)}`:this.isLoading&&this.widgetMode?w`<span class="${an} ${J}" 377 >${Vt(16)}</span 378 >`:this.compact?w`<span class=${J}>${Rt()}</span>`:w`${this.t(`searchResults.searchBar.submit`)}`}renderMobileButtonContent(){return this.isLoading&&!this.widgetMode?w`<span class=${J}>${Bt(this.brand)}</span>`:this.isLoading&&this.widgetMode?w`<span class="${an} ${J}" 379 >${Vt(16)}</span 380 >`:w`<span class=${J}>${Rt()}</span>`}renderSearchButtons(){let e=this.isLoading&&!this.widgetMode,t=e?`button`:`submit`,n=this.widgetMode?this.isLoading||this.isQueryEmpty:!this.isLoading&&this.isQueryEmpty;return w` 381 ${this.compact?D:w`<button 382 class=${nn} 383 type=${t} 384 data-testid="search-button" 385 ?disabled=${n}
386 data-mode=${this.widgetMode?`compact`:D} 387 aria-busy=${this.isLoading} 388 @click=${e?this.handleCancelClick:D} 389 > 390 ${this.renderDesktopButtonContent()} 391 </button>`} 392 393 <button 394 class=${rn} 395 type=${t} 396 ?data-compact=${this.compact} 397 data-testid="search-button-compact" 398 ?disabled=${n} 399 aria-label=${e?this.t(`searchResults.searchBar.stop`):this.t(`searchResults.searchBar.submit`)} 400 aria-busy=${this.isLoading} 401 @click=${e?this.handleCancelClick:D} 402 > 403 ${this.renderMobileButtonContent()} 404 </button> 405 `}renderScreenReaderAnnouncements(){return w` 406 <div 407 role="status" 408 aria-live="polite" 409 aria-atomic="true" 410 style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0" 411 > 412 ${this.isLoading?this.t(`searchResults.searchBar.loading`):``} 413 </div> 414 `}handleFormSubmit(e){e.preventDefault();let t=this.query.trim();t.length!==0&&(this.query=t,this.submitSearch(t))}handleInputFocus(){this.isUsingKeyboard&&(this.isFieldFocusVisible=!0)}resizeTextarea(){let e=this.querySelector(`textarea`);e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)}handleInput(e){this.query=e.target.value.slice(0,500),this.isFieldFocusVisible=!1,this.isDropdownOpen=!0,this.widgetMode||this.resizeTextarea()}handleInputClick(){this.isDropdownOpen=!0}handleItemSelected(e){let{query:t}=e.detail;this.query=t,this.submitSearch(t)}handleDropdownKeyDown(e){if(!e.target.closest(`[role="option"]`)){e.key===`Escape`&&(e.preventDefault(),this.isDropdownOpen=!1,this.inputEl?.focus());return}e.key===`ArrowDown`&&(this.recentSearchesEl?.isLastItemFocused()?(e.preventDefault(),e.stopPropagation(),this.moveToNextSection(`recent`)):this.popularSearchesEl?.isLastItemFocused()?(e.preventDefault(),e.stopPropagation(),this.moveToNextSection(`popular`)):this.suggestionsListEl?.isLastItemFocused()&&(e.preventDefault(),e.stopPropagation(),this.moveToNextSection(`suggestions`))),e.key===`ArrowUp`&&(this.recentSearchesEl?.isFirstItemFocused()?(e.preventDefault(),e.stopPropagation(),this.moveToPrevSection(`recent`)):this.popularSearchesEl?.isFirstItemFocused()?(e.preventDefault(),e.stopPropagation(),this.moveToPrevSection(`popular`)):this.suggestionsListEl?.isFirstItemFocused()&&(e.preventDefault(),e.stopPropagation(),this.moveToPrevSection(`suggestions`))),e.key===`Escape`&&(e.preventDefault(),this.isDropdownOpen=!1,this.inputEl?.focus())}clearAllFocus(){this.recentSearchesEl?.clearFocus(),this.popularSearchesEl?.clearFocus(),this.suggestionsListEl?.clearFocus()}moveToNextSection(e){this.clearAllFocus(),e===`recent`?this.popularSearchesEl&&this.popularSearchesEl.getItemCount()>0?this.popularSearchesEl.focusFirst():this.suggestionsListEl&&this.suggestionsListEl.getItemCount()>0?this.suggestionsListEl.focusFirst():this.recentSearchesEl&&this.recentSearchesEl.focusFirst():e===`popular`?this.suggestionsListEl&&this.suggestionsListEl.getItemCount()>0?this.suggestionsListEl.focusFirst():this.recentSearchesEl&&this.recentSearchesEl.getItemCount()>0?this.recentSearchesEl.focusFirst():this.popularSearchesEl&&this.popularSearchesEl.focusFirst():e===`suggestions`&&(this.recentSearchesEl&&this.recentSearchesEl.getItemCount()>0?this.recentSearchesEl.focusFirst():this.popularSearchesEl&&this.popularSearchesEl.getItemCount()>0?this.popularSearchesEl.focusFirst():this.suggestionsListEl&&this.suggestionsListEl.focusFirst())}moveToPrevSection(e){this.clearAllFocus(),e===`recent`?this.suggestionsListEl&&this.suggestionsListEl.getItemCount()>0?this.suggestionsListEl.focusLast():this.popularSearchesEl&&this.popularSearchesEl.getItemCount()>0?this.popularSearchesEl.focusLast():this.recentSearchesEl&&this.recentSearchesEl.focusLast():e===`popular`?this.recentSearchesEl&&this.recentSearchesEl.getItemCount()>0?this.recentSearchesEl.focusLast():this.suggestionsListEl&&this.suggestionsListEl.getItemCount()>0?this.suggestionsListEl.focusLast():this.popularSearchesEl&&this.popularSearchesEl.focusLast():e===`suggestions`&&(this.popularSearchesEl&&this.popularSearchesEl.getItemCount()>0?this.popularSearchesEl.focusLast():this.recentSearchesEl&&this.recentSearchesEl.getItemCount()>0?this.recentSearchesEl.focusLast():this.suggestionsListEl&&this.suggestionsListEl.focu
414sLast())}focusAndOpen(){this.isDropdownOpen=!0,this.updateComplete.then(()=>{this.inputEl?.focus()})}handleInputKeyDown(e){if(e.key===`Enter`){e.preventDefault();let t=this.query.trim();t.length>0&&this.submitSearch(t)}e.key===`Tab`&&this.shouldShowDropdown&&(this.isDropdownOpen=!1),e.key===`Escape`&&(this.query=``,this.isDropdownOpen=!1),e.key===`ArrowDown`&&this.shouldShowDropdown&&(e.preventDefault(),this.isFieldFocusVisible=!1,this.inputEl?.blur(),this.clearAllFocus(),this.recentSearchesEl&&this.recentSearchesEl.getItemCount()>0?this.recentSearchesEl.focusFirst():this.popularSearchesEl&&this.popularSearchesEl.getItemCount()>0?this.popularSearchesEl.focusFirst():this.suggestionsListEl&&this.suggestionsListEl.getItemCount()>0&&this.suggestionsListEl.focusFirst())}handleWrapperBlur(e){e.currentTarget.contains(e.relatedTarget)||(this.isDropdownOpen=!1)}handleInputBlur(){this.isFieldFocusVisible=!1}handleClear(){this.query=``,this.isDropdownOpen=!0,this.updateComplete.then(()=>{this.inputEl?.focus()})}handleCancelClick(e){e.preventDefault(),e.stopPropagation(),this.isDropdownOpen=!1,this.onCancelSearch?.()}submitSearch(e){let t=e.slice(0,500);this.widgetMode&&c(l(s(),t))&&globalThis.dispatchEvent(new StorageEvent(`storage`,{key:n})),this.query=t,this.isDropdownOpen=!1,this.widgetMode?(this.isLoading=!0,requestAnimationFrame(()=>{let e=yt(globalThis.location.pathname);globalThis.location.href=`${e}?q=${encodeURIComponent(t)}`})):this.onSearchRequest?.({query:t,fromHistory:!1})}};W([M({type:Boolean,attribute:`autofocus`,reflect:!0})],Q.prototype,`autofocus`,void 0),W([M({type:Boolean,attribute:`is-loading`,reflect:!0})],Q.prototype,`isLoading`,void 0),W([M({type:Boolean,attribute:`auto-open-dropdown`,reflect:!0})],Q.prototype,`autoOpenDropdown`,void 0),W([M({type:Boolean,attribute:`compact`,reflect:!0})],Q.prototype,`compact`,void 0),W([M({type:Object})],Q.prototype,`onSearchRequest`,void 0),W([M({type:String})],Q.prototype,`query`,void 0),W([M({type:Object})],Q.prototype,`onCancelSearch`,void 0),W([M({type:Boolean,attribute:`widget-mode`,reflect:!0})],Q.prototype,`widgetMode`,void 0),W([M({type:Object})],Q.prototype,`dictionary`,void 0),W([M({type:Array})],Q.prototype,`suggestions`,void 0),W([M({type:Array})],Q.prototype,`popularSearches`,void 0),W([N()],Q.prototype,`showRawKeys`,void 0),W([N()],Q.prototype,`brand`,void 0),W([N()],Q.prototype,`isOnSearchPage`,void 0),W([N()],Q.prototype,`_dictionary`,void 0),W([N()],Q.prototype,`isDropdownOpen`,void 0),W([N()],Q.prototype,`searches`,void 0),W([N()],Q.prototype,`isFieldFocusVisible`,void 0),W([P(`[data-testid="search-input"]`)],Q.prototype,`inputEl`,void 0),W([P(`recent-searches`)],Q.prototype,`recentSearchesEl`,void 0),W([P(`popular-searches`)],Q.prototype,`popularSearchesEl`,void 0),W([P(`suggestions-list`)],Q.prototype,`suggestionsListEl`,void 0),customElements.get(`search-bar`)||customElements.define(`search-bar`,Q);var Vn=`search-bar-container-host`,Hn=`yit37u0`,Un=`yit37u2`,Wn=t({SearchBarContainer:()=>$}),$=class extends j{constructor(...e){super(...e),this.isExpanded=!1,this.isOnSearchPage=!1,this.brand=``,this.handlePointerDown=e=>{this.contains(e.target)||this.setExpanded(!1)},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.isExpanded&&this.setExpanded(!1)}}get themeClass(){return this.brand?Tt(this.brand):``}connectedCallback(){super.connectedCallback(),this.classList.add(Vn),this.brand=Dt(globalThis.location.hostname),this.isOnSearchPage=bt(globalThis.location.pathname),Mn(),Nn(),at({brand:this.brand,countryCode:L(),language:I()}),R({brand:this.brand,countryCode:L(),language:I()}),document.addEventListener(`pointerdown`,this.handlePointerDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`pointerdown`,this.handlePointerDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}createRenderRoot(){return this}render(){let e=this.isOnSearchPage;return w` 415 <div class="${this.themeClass} ${Hn}"> 416 ${this.isExpanded?D:w` 417 <button 418 class=${on} 419 type="button" 420 data-testid="search-icon-button" 421 aria-label=${On()[`searchResults.searchBar.label`]??`Search`} 422 @click=${e?xt:this.handleExpand} 423 > 424 ${z(16)} 425 </button> 426 `} 427 ${this.isExpanded?w` 428 <div class=${Un}> 429 <search-bar auto-open-dropdown compact widget-mode autofocus></search-bar> 430 </div> 431 `:D} 432 </div> 433 `}setExpanded(e){this.isExpanded=e,(this.closest(`li`)?.closest(`ul`))?.classList.toggle(Ye,e)}handleExpand(){this.setExpanded(!0)}};W([N()],$.prototype,`isExpanded`,void 0),W([N()],$.prototype,`isOnSearchPage`,void 0),W([N()],$.prototype,`brand`,void 0),customElements.get(`search-bar-container`)||customElements.define(`search-bar-container`,$);var Gn=t({}),Kn=t({});Date.now()<0&&console.log(`This will not be logged.`,{RclStyles:Kn,CelStyles:Gn,SearchBar:Pn,SearchBarContainer:Wn,SuggestionsList:en,RecentSearches:Qt,PopularSearches:Xt})})();
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.