PageSourceSearch

https://www.hansaplast.de/dist/Eucerin/modules/Slider.70f423e3.js

js hansaplast.de collected 2026-10-02 11:36:00 UTC 7,943 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[84],{148:function(t,e,r){"use strict";r.r(e);var i=r(277),n=r(0),o=r(256),s=function(){function t(t){var e=this;this.element=t,this.productItems=this.element.querySelectorAll(".teaser"),this.productItem=this.element.querySelector(".teaser"),this.isSampleSlider=this.element.classList.contains("product-samples"),this.productItem&&(this.teaserSliderParent=this.productItem.parentElement),this.productItemsLength=this.productItems.length,(this.element.closest(".ingredient-slider")||this.element.closest(".media-slider"))&&!Eucerin.isMobile||this.isSampleSlider&&this.productItemsLength<3||(this.initSlider(),document.addEventListener("Eucerin:deviceChanged",function(){e.slider.destroy(),e.initSlider()}),this.preventBrowserDragAndDrop())}return t.setup=function(e){void 0===e&&(e='[data-module="Slider"]'),Array.from(document.querySelectorAll(e)).filter(function(t){return!t.dataset.moduleInitialized}).forEach(function(e){new t(e),e.dataset.moduleInitialized="true"})},t.prototype.initSlider=function(){var t={container:this.element.querySelector(".teaser-list"),loop:!1,mouseDrag:!0,preventScrollOnTouch:"auto",speed:400,lazyload:!0,lazyloadSelector:"img"};if(this.options=Object(n.h)(this.element,Object.assign(this.getDefaultOptions(),this.options)),this.options.container=this.element.querySelector(".teaser-list"),Eucerin.isMobile&&1==this.productItemsLength)return!1;if(this.slider=Object(i.a)(Eucerin.isMobile&&this.element.hasAttribute("data-options")||!Eucerin.isMobile?this.options:t),!this.element.closest(".gallery-slider")&&this.addTouchHandlersOnSlider("Homepage Teaser Previous","Homepage Teaser Next"),this.isSampleSlider){var e=Array.from(this.element.querySelectorAll(".sample-teaser")),r=this.element.querySelector(".sample-teaser:last-of-type.active")?e.indexOf(this.element.querySelector(".sample-teaser.active").previousElementSibling):e.indexOf(this.element.querySelector(".sample-teaser.active"));this.slider.goTo(r),this.addSliderArrows()}},t.prototype.preventClickOnDrag=function(){var t=this,e=!1,r=function(){e=!0},i=function(n){e?(n.preventDefault(),t.sliderTeaserImpression()):document.dispatchEvent(new CustomEvent("eucerin-tracking:slider:click",{detail:{target:n.target}})),t.element.removeEventListener("mouseup",i),t.slider.events.off("dragMove",r),e=!1};return this.slider.events.on("dragMove",r),this.element.addEventListener("mouseup",i),this},t.prototype.preventBrowserDragAndDrop=function(){var t=this;return this.element.addEventListener("mousedown",function(e){var r=e.target.closest(".tns-item:not(.tns-item--clickable)");t.preventClickOnDrag(),r&&e.preventDefault()}),this},t.prototype.addTouchHandlersOnSlider=function(t,e,r){var i=this;this.slider.events.on("touchEnd",function(t){i.swipeDirection(i.slider,r)}),this.slider.events.on("dragEnd",function(t){i.swipeDirection(i.slider,r)}),this.slider.events.on("transitionStart",function(t){i.transitionEnd()})},t.prototype.transitionEnd=function(){this.element.querySelector(".sample-teaser-list")&&this.sampleNavLogic()},t.prototype.sampleNavLogic=function(){this.element.querySelector(".sample-teaser:last-of-type").classList.contains("tns-slide-active")&&this.element.querySelector("[data-controls='next']").setAttribute("disabled","")},t.prototype.swipeDirection=function(t,e){var r=(t=t.getInfo()).indexCached,i=t.index;this.sliderTeaserImpression(),i!==r&&(i>r?this.swipeDirectionPrevious("Swipe Next",e):Object(o.e)("Swipe Previous",e))},t.prototype.swipeDirectionPrevious=function(t,e){Object(o.e)(t,e)},t.prototype.addSliderArrows=function(){this.element.querySelectorAll(".tns-controls button").forEach(function(t){t.innerHTML+='<svg width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.63623 1.27271L9.3635 9.99998L0.63623 18.7272" />\n</svg>\n'})},t.prototype.sliderTeaserImpression=function(){var t=Array.from(document.querySelectorAll(".teaser.tns-slide-active:not(.product-show)")),e=[],r=[];t.length>0&&(t.forEach(function(t,i){var n={},o={};n.id=t.getAttribute("product-sku")?t.getAttribute("product-sku"):t.getAttribute("data-product-item-id"),n.name=t.getAttribute("product-name")?t.getAttribute("product-name"):"null",n.list="Products",n.brand="Eucerin",n.category=t.getAttribute("product-category")?t.getAttribute("product-category"):"null",n.variant=t.getAttribute("product-variant")?t.getAttribute("product-variant"):"null",n.position=Array.from(t.parentElement.querySelectorAll(".teaser[data-
1product-item-id]")).indexOf(t)+1;var s=t.querySelector("[product-price]"),a=parseFloat(s&&s.getAttribute("product-price"));n.price=a,e.push(n),t.classList.add("product-show"),o.item_id=n.id,o.item_name=n.name,o.affiliation=t.getAttribute("product-affiliation")?t.getAttribute("product-affiliation"):null,o.coupon=t.querySelector("[product-coupon]")?t.querySelector("[product-coupon]").getAttribute("product-coupon"):null,o.discount=t.getAttribute("product-discount")?t.getAttribute("product-discount"):null,o.index=t.closest("[data-id]")?t.closest("[data-id]").querySelectorAll(".product-show").length:null,o.item_brand="Eucerin",o.item_category=n.category,o.item_category2=t.getAttribute("product-category-2")?t.getAttribute("product-category-2"):null,o.item_category3=t.getAttribute("product-category-3")?t.getAttribute("product-category-3"):null,o.item_category4=t.getAttribute("product-category-4")?t.getAttribute("product-category-4"):null,o.item_category5=t.getAttribute("product-category-5")?t.getAttribute("product-category-5"):null,o.item_list_id=t.closest("[data-id]")?t.closest("[data-id]").getAttribute("data-id"):null,o.item_list_name=t.closest("[product-list]")?t.closest("[product-list]").getAttribute("product-list"):null,o.item_variant=t.getAttribute("product-variant")?t.getAttribute("product-variant"):null,o.price=a,o.quantity=1,r.push(o)}),window.dataLayer.push({event:"impressions",ecommerce:{currencyCode:"EUR",impressions:e}}),window.dataLayer.push({event:"view_item_list",ecommerce:{item_list_id:this.element.closest("[product-list]").getAttribute("data-id"),item_list_name:this.element.closest("[product-list]").getAttribute("product-list"),items:r},_clear:!0}))},t.prototype.getDefaultOptions=function(){return{container:this.element.querySelector(".teaser-list"),loop:!1,mouseDrag:!0,swipeAngle:!1,speed:400,lazyload:!0,lazyloadSelector:"img",preventScrollOnTouch:"auto",responsive:{640:{items:3,edgePadding:10},900:{items:4,edgePadding:0}}}},t}();e.default=s,new s.setup},256:function(t,e,r){"use strict";r.d(e,"d",function(){return s}),r.d(e,"a",function(){return a}),r.d(e,"b",function(){return u}),r.d(e,"c",function(){return c}),r.d(e,"e",function(){return l});var i="addToCart",n="removeFromCart";function o(t,e,r,o){var s=t.querySelector("[product-price]"),a=parseFloat(s&&s.getAttribute("product-price")),u=t.getAttribute("product-category"),c={actionField:{list:u},products:[{id:t.getAttribute("product-sku"),name:t.getAttribute("product-name"),brand:"Eucerin",category:u,variant:t.getAttribute("product-variant"),price:a,quantity:r}],type:o},l={event:e,ecommerce:{currencyCode:t.getAttribute("product-currency")}};e===i?l.ecommerce.add=c:e===n&&(l.ecommerce.remove=c),window.dataLayer.push(l)}function s(t){var e=t,r=e.getAttribute("data-value-name"),i=e.closest("[data-filter-name]").getAttribute("data-filter-name");window.dataLayer&&window.dataLayer.push({event:"ga_event",eventCategory:"Filter",eventAction:i,eventLabel:r,eventNonInteraction:!1})}function a(t,e){void 0===e&&(e=1),o(t,i,e,t.closest(".teaser")?"Teaser":"Button")}function u(t,e,r){o(t,r-e===Math.abs(r-e)?i:n,Math.abs(r-e),"Dropdown")}function c(t,e){o(t,n,e,"Button")}function l(t,e){void 0===e&&(e=""),window.dataLayer.push({event:"ga_event",eventCategory:"Teaser",eventAction:t,eventLabel:e.length>0?e:void 0,eventNonInteraction:!1})}}}]);
2//# sourceMappingURL=/dist/Eucerin/./modules/Slider.70f423e3.js.6bc36866.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.