PageSourceSearch

https://www.seidensticker.com/assets/js/app_Resources_assets_js_th…promotionTracker_js-a74a8e1bcfce90c1ee0e.js

js seidensticker.com collected 2026-09-26 01:39:16 UTC 6,187 bytes, 2 lines download raw bytes

1/*! For license information please see app_Resources_assets_js_theme_module_promotionTracker_js-a74a8e1bcfce90c1ee0e.js.LICENSE.txt */
2(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["app_Resources_assets_js_theme_module_promotionTracker_js"],{
2"./app/Resources/assets/js/theme/module/promotionTracker.js":(t,e,r)=>{var i=r("./node_modules/jquery/dist/jquery-exposed.js");function n(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r,"last"),s=i(t);for(const t of o){const r=this.normalizeText(s.text());this.trackLinkAction(e,n,r,t)}}const o=new class{constructor(){this._handler={},this._observer=new IntersectionObserver(this.onIntersection.bind(this),{root:null,rootMargin:"0px",threshold:.5})}onIntersection(t){for(const e of t)e.isIntersecting?(e.target.dataset.isCurrentlyViewed="true",setTimeout((()=>{this.onViewEnter(e.target)}),1e3)):e.target.dataset.isCurrentlyViewed="false"}onViewEnter(t){if("true"===t.dataset.isCurrentlyViewed){(0,this._handler[t.dataset.promotionHandler])(t,"view")}}registerHandler(t,e){if(void 0!==this._handler[t])throw new Error(`Promotion handler "${t}" is already registered`);return this._handler[t]=e.bind(this),this}registerModule(t,e){const r=this._handler[t];if(void 0===r)throw new Error(`Promotion handler "${t}" is not yet registered`);e.dataset.promotionHandler=t;for(const t of e.querySelectorAll("a"))t.addEventListener("click",(()=>{r(e,"click",t)}));return this._observer.observe(e),this}promoClickTracking(t){dataLayer.push({event:"promotionClick",ecommerce:{promoClick:{promotions:[t]}}})}promoViewTracking(t){dataLayer.push({event:"promotionView",ecommerce:{promoView:{promotions:[t]}}})}trackLinkAction(t,e,r,i){const n={id:e,name:r||e,creative:i?i.href:"",position:i?i.dataset.position:"1"};switch(t){case"click":this.promoClickTracking(n);break;case"view":this.promoViewTracking(n);break;default:throw new Error(`Unknown promotion tracking action "${t}"`)}}getActionLinks(t,e,r,i=!1){if("click"===t)return[r];const n=e.querySelectorAll("a");if(i)switch(i){case"first":return[n[0]];case"last":return[n[n.length-1]];default:throw new Error(`Unknown promotion link filter "${i}"`)}return Array.from(n)}normalizeText(t){return t.replace(/(\r\n|\n|\r|\s+)/gm," ").trim()}};o.registerHandler("collaboration-module",n).registerHandler("dual-fullwidth",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r);for(const t of o){const r=this.normalizeText(i(t).find(".h2").text());this.trackLinkAction(e,n,r,t)}})).registerHandler("dual-teaser-entry-banner",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r);for(const t of o){const r=this.normalizeText(i(t).find(".headline").text());this.trackLinkAction(e,n,r,t)}})).registerHandler("fifty-fifty-text-image",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r,"last"),s=i(t);for(const t of o){const r=this.normalizeText(s.find(".text-wrapper").text());this.trackLinkAction(e,n,r,t)}})).registerHandler("four-banner-teaser",n).registerHandler("fullscreen-banner",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r,"last"),s=i(t);for(const t of o){const r=s.find("h1").text(),i=s.find("h2").text();this.trackLinkAction(e,n,this.normalizeText(r+" "+i),t)}})).registerHandler("multi-grid-module",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r,"last"),s=i(t);for(const t of o){const r=this.normalizeText(i(t).find(".align-items-end>:first-child").text())||this.normalizeText(s.find(".text-center>:first-child").text());this.trackLinkAction(e,n,r,t)}})).registerHandler("page-entry",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r,"last"),s=i(t);for(const t of o){const r=this.normalizeText(s.find(".px-md-0>:first-child").text());this.trackLinkAction(e,n,r,t)}})).registerHandler("slider-custom-articles",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r),s=i(t);for(const t of o){const r=this.normalizeText(s.find(".text-md-center>:first-child").text());this.trackLinkAction(e,n,r,t)}})).registerHandler("teaser-four-grid-image",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r);for(const t of o){const r=this.normalizeText(i(t).find("h2").text());this.trackLinkAction(e,n,r,t)}}
2)).registerHandler("article-collection-portrait-teaser",n).registerHandler("article-collection-landscape-teaser",n).registerHandler("highlight-slider",n).registerHandler("promo-teaser",n).registerHandler("dual-fullscreen-banner",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r),s=i(t);for(const t of o){const r=this.normalizeText(i(t).text())||this.normalizeText(s.find(".h1").text());this.trackLinkAction(e,n,r,t)}})).registerHandler("fullwidth-image-module",n).registerHandler("fullscreen-slider",(function(t,e,r){const n=t.dataset.promotionHandler,o=this.getActionLinks(e,t,r),s=i(t);for(const t of o){const r=this.normalizeText(s.text());this.trackLinkAction(e,n,r,t)}})).registerHandler("usp-module",n);const s={"collaboration-module":".collaboration-module .teaser-item","dual-fullwidth":".dual-fullwidth","dual-teaser-entry-banner":".dual-teaser-entry-banner","fifty-fifty-text-image":".fifty-fifty-text-image","four-banner-teaser":".four-banner-teaser .banner-teaser-item","fullscreen-banner":".fullscreen-banner","multi-grid-module":".multi-grid-module .image","page-entry":".page-entry","slider-custom-articles":".slider-custom-articles .product-slider-item","teaser-four-grid-image":".teaser-four-grid-image .images","article-collection-portrait-teaser":".article-item-wrapper .teaser-portrait","article-collection-landscape-teaser":".article-item-wrapper .teaser-landscape","highlight-slider":".highlight-slider .item-header","promo-teaser":".promo-teaser .content-container","dual-fullscreen-banner":".dual-teaser .teaser-item","fullwidth-image-module":".fullwidth-image-module","fullscreen-slider":".fullscreen-slider","usp-module":".usp-module"};for(const t in s){const e=s[t];for(const r of document.querySelectorAll(e))try{o.registerModule(t,r)}catch(t){window.console&&console.error(t)}}}
2}]);

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.