1(function(){if(!window.WCFILTER_TOOLTIPS)return;const ROOT=document.querySelector(WCFILTER_TOOLTIPS.selector||'body');if(!ROOT)return;const TEXT=WCFILTER_TOOLTIPS.map||{};const place=(WCFILTER_TOOLTIPS.placement||'top').toLowerCase()==='bottom'?'wcf-tt-bottom':'wcf-tt-top';function keyFromLabel(label){const t=(label||'').trim().toLowerCase();if(t==='price'||t.includes('price'))return'price';if(t.includes('dominant')&&(t.includes('colour')||t.includes('color')))return'colour';if(t.includes('colour')||t.includes('color'))return'colour';if(t.includes('size'))return'size';if(t.includes('orientation'))return'orientation';if(t.includes('medium'))return'medium';if(t.includes('animal'))return'animal';return null} 2function resolveKeyFromFilterBox(el){const cls=el.className||'';if(el.classList?.contains('wcf-filter-sorter'))return null;if(cls.match(/\bwcf-filter-sizecategory\b/))return'size';if(cls.match(/\bwcf-filter-orientation\b/))return'orientation';if(cls.match(/\bwcf-filter-medium\b/))return'medium';if(cls.match(/\bwcf-filter-animal/i))return'animal';if(cls.match(/\bwcf-filter-colou?r\b/))return'colour';if(cls.match(/\bwcf-filter-dominant[-_]colou?r\b/))return'colour';const sel=el.querySelector('select[name]');if(sel){const n=(sel.getAttribute('name')||'').toLowerCase();if(n.includes('defaultsorting'))return null;if(n.includes('size'))return'size';if(n.includes('orientation'))return'orientation';if(n.includes('medium'))return'medium';if(n.includes('animal'))return'animal';if(n.includes('dominant')||n.includes('colour')||n.includes('color')) 3return'colour'} 4const triggerTxt=(el.querySelector('.rt-SelectTriggerInner')?.textContent||'');return keyFromLabel(triggerTxt)} 5function makeTooltip(text){const wrap=document.createElement('span');wrap.className='wcf-tt-wrap';wrap.style.position='absolute';wrap.style.right='0';wrap.style.top='0';const btn=document.createElement('button');btn.type='button';btn.className='wcf-tt-badge';btn.setAttribute('aria-label','Help');btn.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="10" height="10" fill="white" aria-hidden="true" focusable="false"><text x="7" y="10" text-anchor="middle" font-size="10" font-family="sans-serif" font-weight="700" fill="white">?</text></svg>';const panel=document.createElement('div');panel.className=`wcf-tt-panel ${place}`;panel.textContent=text;btn.addEventListener('click',(e)=>{e.preventDefault();wrap.classList.toggle('wcf-tt-open')});document.addEventListener('click',(e)=>{if(!wrap.contains(e.target))wrap.classList.remove('wcf-tt-open')});wrap.appendChild(btn);wrap.appendChild(panel);return wrap} 6function cleanupWrongPriceTooltips(){ROOT.querySelectorAll('.wcf-tt-price').forEach(container=>{const btn=container.querySelector('.wcf-filter-horizontal-trigger');const label=btn?btn.textContent:'';const key=keyFromLabel(label);if(key!=='price'){container.classList.remove('wcf-tt-price');container.querySelectorAll('.wcf-tt-wrap').forEach(n=>n.remove())}})} 7function attachTooltips(){cleanupWrongPriceTooltips();ROOT.querySelectorAll('.wcf-filter').forEach((box)=>{if(box.classList.contains('wcf-filter-sorter'))return;if(box.querySelector('.wcf-tt-wrap'))return;const key=resolveKeyFromFilterBox(box);const copy=key&&TEXT[key];if(!copy)return;const tip=makeTooltip(copy);tip.style.top='-8px';box.style.position=box.style.position||'relative';box.appendChild(tip)});ROOT.querySelectorAll('.wcf-filter-horizontal-container > .rt-BaseButton.wcf-filter-horizontal-trigger').forEach((btn)=>{const parent=btn.closest('.wcf-filter-horizontal-container');if(!parent||parent.querySelector('.wcf-tt-wrap'))return;if(parent.closest('.wcf-filter-sorter'))return;const label=btn.textContent||'';const key=keyFromLabel(label);if(!key)return;const copy=TEXT[key];if(!copy)return;if(key==='price')parent.classList.add('wcf-tt-price');parent.style.position=parent.style.position||'relative';const tip=makeTooltip(copy);tip.style.top=key==='price'?'-10px':'-8px';parent.appendChild(tip)})} 8attachTooltips();const obs=new MutationObserver((muts)=>{for(const m of muts){if(m.addedNodes&&m.addedNodes.length){attachTooltips();break}}});obs.observe(ROOT,{childList:!0,subtree:!0})})()
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.