1(function(){"use strict";const ns=window.igelkott;if(!ns||!ns.log)return;const log=ns.log;function clean(t){return(t||"").replace(/\s+/g," ").trim().slice(0,60)||null}function labelFor(el){return el.getAttribute("data-track")||el.getAttribute("aria-label")||el.getAttribute("title")||el.getAttribute("name")||el.id||clean(el.textContent)||el.querySelector&&el.querySelector("img")&&clean(el.querySelector("img").alt)||el.tagName.toLowerCase()}function areaFor(el){return el.closest("[data-track-area]")?el.closest("[data-track-area]").getAttribute("data-track-area"):el.closest("header, .igelkott-header, [data-igelkott-account-menu]")?"header":el.closest("footer, .igelkott-footer")?"footer":el.closest("[data-hero-cta-primary], .igelkott-hero, [data-feed-hero]")?"hero":el.closest("[data-feed-card], [data-feed-cards]")?"feed":el.closest("[data-product-form], .igelkott-product, [data-product-action]")?"product":el.closest("[data-cart-form], .igelkott-cart")?"cart":el.closest("[data-cookie-action], .igelkott-cookie-banner")?"consent":el.closest('dialog, [role="dialog"], .igelkott-modal')?"modal":ns.page&&ns.page.template||"page"}function handleFor(el){const c=el.closest("[data-handle], [data-product-handle], [data-feed-card]");return c&&(c.getAttribute("data-handle")||c.getAttribute("data-product-handle"))||ns.page&&ns.page.handle||null}function hrefInfo(el){const a=el.closest("a[href]");if(!a)return{href:null,outbound:!1};try{const u=new URL(a.getAttribute("href"),window.location.href),internal=u.hostname===window.location.hostname||/\.(myshopify|shopify)\.com$/.test(u.hostname);return{href:(u.pathname+u.search).slice(0,200),outbound:!internal,host:u.hostname}}catch{return{href:a.getAttribute("href"),outbound:!1}}}let clicks=0,lastKey="",lastAt=0;document.addEventListener("click",ev=>{const t=ev.target&&ev.target.closest&&ev.target.closest('a, button, summary, label, [role="button"], input[type="submit"], input[type="radio"], input[type="checkbox"], select, [data-track]');if(!t)return;clicks++;const el=labelFor(t),key=el+"|"+t.tagName,now=Date.now();if(key===lastKey&&now-lastAt<300)return;lastKey=key,lastAt=now;const h=hrefInfo(t);log.info("ui.click",{el,text:clean(t.textContent),tag:t.tagName.toLowerCase(),area:areaFor(t),handle:handleFor(t),href:h.href,outbound:h.outbound||void 0,host:h.outbound?h.host:void 0,value:t.tagName==="INPUT"&&t.type==="radio"?t.value:void 0})},!0),document.addEventListener("submit",ev=>{const f=ev.target;if(!f||f.tagName!=="FORM")return;const submitter=ev.submitter||null;let action=null;try{action=new URL(f.getAttribute("action")||window.location.href,window.location.href).pathname}catch{}const form=f.getAttribute("data-track")||f.id||f.className&&String(f.className).split(" ")[0]||action||"form",fields={};try{const fd=new FormData(f);for(const[k,v]of fd.entries()){if(/email|name|phone|body|message|password|address/i.test(k)){fields[k]=v?"***":"";continue}typeof v=="string"&&(fields[k]=v.slice(0,80))}}catch{}const ctx={form,action,area:areaFor(f),submitter:submitter?labelFor(submitter):null,fields};if(log.info("ui.submit",ctx),f.hasAttribute("data-product-form")){const buy=submitter&&submitter.hasAttribute("data-product-buy");log.info("cart.add_submitted",{handle:handleFor(f),variant_id:fields.id||null,via:buy?"buy":submitter?labelFor(submitter):"enter"})}f.hasAttribute("data-cart-form")&&submitter&&submitter.name==="checkout"&&log.info("checkout.started",{items:Object.keys(fields).filter(k=>/^updates\[/.test(k)).length||null}),(/localization/i.test(action||"")||f.classList.contains("igelkott-footer__locale-form"))&&log.info("locale.changed",{language:fields.language_code||null,country:fields.country_code||null}),(f.id==="ContactForm"||/contact/i.test(action||""))&&log.info("contact.submitted",{newsletter:!!fields["contact[tags]"]})},!0),document.addEventListener("click",ev=>{const b=ev.target&&ev.target.closest&&ev.target.closest("[data-cookie-action]");b&&log.info("consent.decided",{choice:b.getAttribute("data-cookie-action")})},!0);let maxScroll=0;function measureScroll(){const doc=document.documentElement,total=Math.max(1,doc.scrollHeight-window.innerHeight),pct=Math.min(100,Math.round((window.scrollY||doc.scrollTop)/total*100));pct>maxScroll&&(maxScroll=pct)}window.addEventListener("scroll",measureScroll,{passive:!0}),window.addEventListener("load",measureScroll);let activeMs=0,activeSince=document.visibilityState==="visible"?Date.now():null,lastInput=Date.now();["mousemove","keydown","scroll","touchstart","click"].forEach(t=>window.addEventListener(t,()=>{lastInput=Date.now()},{passive:!0})),setInterval(()=>{activeSince&&Date.now()-lastInput<6e4&&(activeMs+=1e3)},1e3),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"?activeSince=Date.now():(activeSince=null,sendEngaged("hidden"))});let sentClicks=0;function sendEngaged(reason){measureScroll();
1const active_s=Math.round(activeMs/1e3),newClicks=clicks-sentClicks;active_s===0&&newClicks===0&&reason!=="pagehide"||(log.info("page.engaged",{active_s,scroll_pct:maxScroll,clicks:newClicks,reason,handle:ns.page&&ns.page.handle||null}),activeMs=0,sentClicks=clicks)}window.addEventListener("pagehide",()=>sendEngaged("pagehide")),log.debug("track.initialized",{})})(); 2//# sourceMappingURL=/cdn/shop/t/14/assets/igelkott-track.js.map?v=139081045097865831641789301848
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.