PageSourceSearch

https://www.vistaprint.dk/assets/ubik/web/@vp/fragment-homepage-fr…/lib/web/systemjs/trackingUtils-2BuBiGlP.js

js vistaprint.dk collected 2026-10-03 21:26:12 UTC 4,103 bytes, 2 lines download raw bytes

1System.register(["@vp/tracking","./constants-CyaWClOw.js","@vp/ubik-context"],(function(g){"use strict";var k,$,v;return{setters:[function(u){k=u.getTracking},function(u){$=u.P},function(u){v=u.trackRuntimeEvent}],execute:(function(){const u=(e,o)=>{const n=[],i=(t,s,a)=>{switch(s.type){case"string":{const r=s;if(typeof t!="string"){n.push({path:a,message:"Expected string",value:t});return}r.enum&&!r.enum.includes(t)&&n.push({path:a,message:`Must be one of: ${r.enum.join(", ")}`,value:t}),r.pattern&&!new RegExp(r.pattern).test(t)&&n.push({path:a,message:`Does not match pattern ${r.pattern}`,value:t}),r.format==="uuid"&&(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)||n.push({path:a,message:"Must be a valid UUID",value:t}));break}case"integer":{const r=s;if(typeof t!="number"||!Number.isInteger(t)){n.push({path:a,message:"Expected integer",value:t});return}r.const!==void 0&&t!==r.const&&n.push({path:a,message:`Must be exactly ${r.const}`,value:t});break}case"object":{const r=s;if(typeof t!="object"||t===null||Array.isArray(t)){n.push({path:a,message:"Expected object",value:t});return}const c=t;for(const d of r.required||[])d in c||n.push({path:`${a}.${d}`,message:"Missing required property",value:void 0});for(const[d,f]of Object.entries(c)){const p=r.properties[d];if(!p){r.additionalProperties===!1&&n.push({path:`${a}.${d}`,message:"Unexpected property",value:f});continue}i(f,p,`${a}.${d}`)}break}default:n.push({path:a,message:`Unsupported schema type: ${s.type}`,value:t})}};return i(e,o,""),{valid:n.length===0,errors:n}},I=(e,o,n,i)=>{const{valid:t,errors:s}=u(o,n);t||i.error(`Validation failed for tracking event ${e}`,{errors:s})},P=(e,o,n)=>{const i=k();if(i)i.track(e,o,{});else{const t=crypto.randomUUID();n.warn(`Tracking not available for event: ${e}. Waiting for trackingReady event.`,{trackingUuid:t});const s={once:!0};window.addEventListener("trackingReady",()=>{k()?.track(e,o,{}),n.info(`Tracking event ${e} sent after trackingReady event.`,{trackingUuid:t})},s)}},b=g("v",(e,o,n,i)=>{I(e,o,n,i),P(e,o,i)}),x=g("t",(e,o,n,i,t,s)=>{const a={label:`MAP tracking homepage ${e} ${i}`,experimentName:`MAP_tracking_${e}`,variationName:o,experimentDetail:n,impressionEventVersion:3};b("Experiment Clicked",a,s,t)}),w=300,R=g("b",e=>!e||typeof e=="string"?null:e.linkType==="External"?e.trackingId:e.actionId),U=g("c",(e,o,n,i,t,s,a,r,c,d,f)=>{if(e)return p=>{if(p.stopPropagation(),S(p),b(e.eventName,e.properties,n,o),c&&v(c,{navigationDetail:e.properties.navigationDetail}),a&&r){const{pageZone:l,placementVariantId:y,placementDefinitionId:m}=a;x(l,y,m,"click",o,r)}i&&setTimeout(()=>D(i,t),w),s&&setTimeout(s,w)}}),C=g("a",({destinationUrl:e,pageZone:o,linkIdentifier:n,ctaPosition:i})=>{const t=n?.trim(),s=typeof window<"u"?window.location.pathname:"/",a=E(e),r=`${s};${a};${o};${t}`,c=i&&(typeof i=="number"&&i>0||typeof i=="string")?`${t}:${i}`:t;return{eventName:"Navigation Clicked",properties:{category:$,label:`Content:${o}`,eventDetail:r,navigationDetail:c},linkAttributes:{"data-section":`Content:${o}`,"data-position":i,"data-translation":t}}}),T=e=>{const{destinationPagePath:o,ctaValue:n,mpvId:i,productKey:t,subSection:s,sourcePagePath:a,position:r,pageZone:c}=e,{experimentId:d,experimentKey:f,variationId:p,variationKey:l}=e,y=E(o),m=s?`${s}:${n}`:n,h=`${a};${y};${c};${m}`,A=`${m}:${r}`,N="Navigation Clicked",_=d&&p?{experimentId:d.toString(),experimentName:f,variationId:p.toString(),variationName:l}:{};return{eventName:N,properties:{category:"Home Page",label:`Content:${c}`,eventDetail:h,navigationDetail:c==="Hero"?n:A,product_id:i,core_product_id:t,..._},linkAttributes:{"data-section":`Content:${c}`,"data-position":r,"data-translation":m}}},M=g("g",(e,o,n,i)=>T({sourcePagePath:e,destinationPagePath:o,pageZone:"SEO Zone",ctaValue:n,subSection:void 0,position:i})),D=(e,o)=>{typeof window>"u"||(o?window.open(e,"_blank"):window.location.href=e)},S=e=>e.preventDefault(),E=g("r",e=>typeof window<"u"?new URL(e,window.location.origin).pathname:e)})}}));
2//# sourceMappingURL=trackingUtils-DqSbYcm6.js.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.