PageSourceSearch

https://www.lobkowicz.cz/_nuxt/B0GfDgAY.js

js lobkowicz.cz collected 2026-10-02 10:37:39 UTC 4,471 bytes, 2 lines download raw bytes

1import{k as f}from"./TvATKHO3.js";var y=/^(GTM|G)-[0-9A-Z]+$/;function h(t){if(typeof t!="string"||!y.test(t)){let e=String(t).toUpperCase().replace(/.*-|[^0-9A-Z]/g,""),a=e.length===0?"":` Did you mean 'GTM-${e}' or 'G-${e}'?`;throw new Error(`'${t}' is not a valid GTM-ID (${y}).${a}`)}}function m(t,e="dataLayer"){return t[e]||(t[e]=[]),t[e]}function d(t,e){let a=document,n=a.createElement("script"),r=c=>{e.onReady?.({id:t,script:n}),n.removeEventListener("load",r)};n.addEventListener("load",r);let l=e.dataLayerName??"dataLayer";if(m(window,l).push({event:"gtm.js","gtm.start":new Date().getTime()}),!t)return n;n.async=!e.defer,n.defer=!!(e.defer||e.compatibility),e.nonce&&n.setAttribute("nonce",e.nonce),e.scriptType&&(n.type=e.scriptType);let i=new URLSearchParams({id:t,...e.dataLayerName?{l:e.dataLayerName}:{},...e.queryParams??{}}),o=e.source??"https://www.googletagmanager.com/gtm.js";n.src=`${o}?${i}`;let p=e.parentElement??a.body;if(typeof p?.appendChild!="function")throw new Error("parentElement must be a DOM element");return p.appendChild(n),n}function w(t="https://www.googletagmanager.com/gtm.js"){return Array.from(document.getElementsByTagName("script")).some(e=>e.src.includes(t))}var b=class{id;options;scriptElements=[];constructor(t){if(Array.isArray(t.id))for(let e of t.id)h(typeof e=="string"?e:e.id);else h(t.id);this.id=t.id,this.options={enabled:!0,debug:!1,loadScript:!0,defer:!1,compatibility:!1,dataLayerName:"dataLayer",...t},delete this.options.id}isInBrowserContext=()=>typeof window<"u";enabled(){return this.options.enabled??!0}enable(t=!0,e){if(this.options.enabled=t,this.isInBrowserContext()&&t&&!w(e)&&this.options.loadScript)if(Array.isArray(this.id))this.id.forEach(a=>{let n;typeof a=="string"?n=d(a,{...this.options}):n=d(a.id,{...this.options,queryParams:a.queryParams}),this.scriptElements.push(n)});else{let a=d(this.id,{...this.options});this.scriptElements.push(a)}}debugEnabled(){return this.options.debug??!1}debug(t){this.options.debug=t}dataLayer(){return this.isInBrowserContext()&&this.options.enabled?m(window,this.options.dataLayerName):!1}trackView(t,e,a={}){let n=this.isInBrowserContext()&&(this.options.enabled??!1);this.options.debug&&console.log(`[GTM-Support${n?"":"(disabled)"}]: Dispatching TrackView`,{screenName:t,path:e}),n&&m(window,this.options.dataLayerName).push({...a,event:this.options.trackViewEventProperty??"content-view","content-name":e,"content-view-name":t})}trackEvent({event:t,category:e=null,action:a=null,label:n=null,value:r=null,noninteraction:l=!1,...i}={}){let o=this.isInBrowserContext()&&(this.options.enabled??!1);this.options.debug&&console.log(`[GTM-Support${o?"":"(disabled)"}]: Dispatching event`,{event:t,category:e,action:a,label:n,value:r,...i}),o&&m(window,this.options.dataLayerName).push({event:t??"interaction",target:e,action:a,"target-properties":n,value:r,"interaction-type":l,...i})}push(t){let e=this.isInBrowserContext()&&(this.options.enabled??!1);this.options.debug&&console.log(`[GTM-Support${e?"":"(disabled)"}]: Dispatching event`,t),e&&m(window,this.options.dataLayerName).push(t)}},s;function v(t,e={id:""}){e={trackOnNextTick:!1,...e},s=new b(e),t.config.globalProperties.$gtm=s,s.isInBrowserContext()&&(e.vueRouter&&E(t,e.vueRouter,e.ignoredViews,e.trackOnNextTick,e.vueRouterAdditionalEventData),s.options.enabled&&s.options.loadScript&&(Array.isArray(e.id)?e.id.forEach(a=>{if(typeof a=="string")d(a,e);else{let n={...e};a.queryParams!=null&&(n.queryParams={...n.queryParams,...a.queryParams}),d(a.id,n)}}):d(e.id,e))),t.provide("gtm",e)}function E(t,e,a=[],n,r=()=>({})){function l(i,o){return i instanceof Error?!!(i.type&o):!1}e.afterEach(async(i,o,p)=>{if(typeof i.name!="string"||Array.isArray(a)&&a.includes(i.name)||typeof a=="function"&&a(i,o))return;let c=i.meta&&typeof i.meta.gtm=="string"&&i.meta.gtm?i.meta.gtm:i.name;l(p,4)?s?.debugEnabled()&&console.log(`[VueGtm]: '${c}' not tracked due to navigation aborted`):l(p,8)&&s?.debugEnabled()&&console.log(`[VueGtm]: '${c}' not tracked due to navigation cancelled`);let g={...await r(i,o),...i.meta?.gtmAdditionalEventData},u=e.options?.history?.base??"";u.endsWith("/")||(u+="/"),u+=i.fullPath.startsWith("/")?i.fullPath.substring(1):i.fullPath,n?f(()=>{s?.trackView(c,u,g)}):s?.trackView(c,u,g)})}function k(t){return{install:e=>v(e,t)}}
1export{b as GtmPlugin,b as GtmSupport,h as assertIsGtmId,k as createGtm,w as hasScript,d as loadScript};
2//# sourceMappingURL=B0GfDgAY.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.