PageSourceSearch

https://www.honda.pl/etc/designs/honda/hme-core-front-end/three-sixty-swatches.vaf5dqocspzkw7wg.js

js honda.pl collected 2026-10-02 18:50:17 UTC 1,958 bytes, 1 lines download raw bytes

1var t=Object.defineProperty,e=(e,s,a)=>((e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a)(e,"symbol"!=typeof s?s+"":s,a);import{s}from"./index.cz83wh4sws6slzdm.js";import{A as a}from"./index.fwy4myo0zwt1lnjt.js";const n="three-sixty-swatches",i=`[data-hme-is="${n}"]`,c="hme-three-sixty-swatches__swatch-button--active";class h extends a{constructor(){super(...arguments),e(this,"activeSwatchButton")}init(){this.activeSwatchButton=this.elements.swatchButton[0],this.addEventHandlers()}addEventHandlers(){this.elements.self.addEventListener("keydown",t=>this.onKeyDown(t)),this.elements.swatchButton.forEach(t=>{t.addEventListener("click",()=>{this.onSwatchButtonClick(t)})})}onKeyDown(t){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return t.preventDefault(),void this.setActiveSwatchButton("prev");"ArrowRight"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.setActiveSwatchButton("next"))}onSwatchButtonClick(t){var e,s,a,n;const i={imageSrc:null!=(e=t.dataset.imageSrc)?e:""};this.elements.activeColorName.textContent=null!=(s=t.dataset.colourName)?s:"",this.elements.activePrice.textContent=null!=(a=t.dataset.price)?a:"",this.elements.activeDisclaimer&&(this.elements.activeDisclaimer.textContent=null!=(n=t.dataset.disclaimer)?n:""),this.elements.swatchButton.forEach(e=>{e===t?(e.classList.add(c),e.setAttribute("aria-checked","true")):(e.classList.remove(c),e.setAttribute("aria-checked","false"))}),super.dispatchEvent("hme-three-sixty-swatches:change",i)}setActiveSwatchButton(t){const e=this.elements.swatchButton.indexOf(this.activeSwatchButton);let a;a="prev"===t?e-1<0?this.elements.swatchButton.length-1:e-1:e+1>=this.elements.swatchButton.length?0:e+1,this.activeSwatchButton=this.elements.swatchButton[a],this.elements.swatchButton.forEach(t=>{t===this.activeSwatchButton?t.tabIndex=0:t.tabIndex=-1}),s(this.activeSwatchButton)}}e(h,"SELF",i),e(h,"NS","hme"),e(h,"IS",n);export{i as SELF,h as default};

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.