PageSourceSearch

https://www.myhomelando.de/theme/ed86e0fe252b6a0bc9fec2e0b74e6d63/…/dtgs-google-tag-manager-sw6.js?1790245897

js myhomelando.de collected 2026-10-08 11:03:35 UTC 19,938 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==s},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function n(e,t,s){return e.concat(t).map(function(e){return r(e,s)})}function i(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,s,c){(c=c||{}).arrayMerge=c.arrayMerge||n,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=r;var l,u,d=Array.isArray(s);return d!==Array.isArray(e)?r(s,c):d?c.arrayMerge(e,s,c):(u={},(l=c).isMergeableObject(e)&&i(e).forEach(function(t){u[t]=r(e[t],l)}),i(s).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&l.isMergeableObject(s[t])?u[t]=(function(e,t){if(!t.customMerge)return o;var s=t.customMerge(e);return"function"==typeof s?s:o})(t,l)(e[t],s[t],l):u[t]=r(s[t],l))}),u)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,s){return o(e,s,t)},{})},e.exports=o}},t={};function s(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,s),i.exports}(()=>{s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}})(),(()=>{s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e=s(857),t=s.n(e);class r{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let s=r.toUpperCamelCase(e,t);return r.lcFirst(s)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>r.ucFirst(e.toLowerCase())).join(""):r.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class n{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!n.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!1===n.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(s)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.replace(/^data(|-)/,""),a=r.toLowerCamelCase(i,"-");if(!n.isNode(e)){if(s)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(s)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[a];if(void 0===o){if(s)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return o}return r.parsePrimitive(o)}static querySelector(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelector(t)||!1;if(s&&!1===r)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return r}static querySelectorAll(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let r=e.querySelectorAll(t);if(0===r.length&&(r=!1),s&&!1===r)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return r}}class i{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new CustomEvent(e,{detail:t,cancelable:s});return this.el.dispatchEvent(r),r}subscribe(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this,n=e.split("."),i=s.scope?t.bind(s.scope):t;if(s.once&&!0===s.once){let t=i;i=function(s){r.unsubscribe(e),t(s)}}return this.el.addEventListener(n[0],i),this.listeners.push({splitEventName:n,opts:s,cb:i}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,s)=>([...s.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):e.push(s),e),[]),!0}
1reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}class a{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let s=r.toDashCase(this._pluginName),i=n.getDataAttribute(this.el,"data-".concat(s,"-config"),!1),a=n.getAttribute(this.el,"data-".concat(s,"-options"),!1),o=[this.constructor.options,this.options,e];i&&o.push(window.PluginConfigManager.get(this._pluginName,i));try{a&&o.push(JSON.parse(a))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(s,'-options" could not be parsed to json: ').concat(e.message))}return t().all(o.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},s=!1){if(!n.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new i(this.el),this._pluginName=this._getPluginName(s),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}class o{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,s){if(null==e)throw Error("You must specify a key to set a cookie");let r=new Date;r.setTime(r.getTime()+864e5*s);let n="";"https:"===location.protocol&&(n="secure"),document.cookie="".concat(e,"=").concat(t,";expires=").concat(r.toUTCString(),";path=/;sameSite=lax;").concat(n)}static getItem(e){if(!e)return!1;let t=e+"=",s=document.cookie.split(";");for(let e=0;e<s.length;e++){let r=s[e];for(;" "===r.charAt(0);)r=r.substring(1);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return!1}static removeItem(e){document.cookie="".concat(e,"= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/")}static key(){return""}static clear(){}}class c{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return c.isIPhoneDevice()||c.isIPadDevice()}static isNativeWindowsBrowser(){return c.isIEBrowser()||c.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":c.isTouchDevice(),"is-ios":c.isIOSDevice(),"is-native-windows":c.isNativeWindowsBrowser(),"is-iphone":c.isIPhoneDevice(),"is-ipad":c.isIPadDevice(),"is-ie":c.isIEBrowser(),"is-edge":c.isEdgeBrowser()}}}class l{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var s of e.entries())t(s[1],s[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(s=>{t(e[s],s)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}let u="offcanvas";class d{open(e,t,s,r,n,i,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(s,i,a,r);this.setContent(e,r,n),this._openOffcanvas(o,t)}setContent(e,t){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=e,this._registerEvents(t))}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(".".concat(u))}close(e){let t=this.getOffCanvas();l.iterate(t,e=>{bootstrap.Offcanvas.getInstance(e).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(e,t){d.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}
1_registerEvents(e){let t=c.isTouchDevice()?"touchend":"click",s=this.getOffCanvas();l.iterate(s,t=>{let r=()=>{setTimeout(()=>{t.remove(),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:s})},e),t.removeEventListener("hide.bs.offcanvas",r)};t.addEventListener("hide.bs.offcanvas",r)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0});let r=document.querySelectorAll(".".concat("js-offcanvas-close"));l.iterate(r,s=>s.addEventListener(t,this.close.bind(this,e)))}_removeExistingOffCanvas(){d.bsOffcanvas=null;let e=this.getOffCanvas();return l.iterate(e,e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":"offcanvas-".concat(e)}_createOffCanvas(e,t,s,r){let n=document.createElement("div");if(n.classList.add(u),n.classList.add(this._getPositionClass(e)),!0===t&&n.classList.add("is-fullwidth"),s){let e=typeof s;if("string"===e)n.classList.add(s);else if(Array.isArray(s))s.forEach(e=>{n.classList.add(e)});else throw Error('The type "'.concat(e,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(n),d.bsOffcanvas=new bootstrap.Offcanvas(n,{backdrop:!1!==r||"static"}),n}constructor(){this.$emitter=new i}}let h=Object.freeze(new d);class g{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",r=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";h.open(e,t,s,r,n,i,a)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;h.setContent(e,t,s)}static setAdditionalClassName(e){h.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;h.close(e)}static exists(){return h.exists()}static getOffCanvas(){return h.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}class p{get(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",r=this._createPreparedRequest("GET",e,s);return this._sendRequest(r,null,t)}post(e,t,s){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let n=this._createPreparedRequest("POST",e,r);return this._sendRequest(n,t,s)}delete(e,t,s){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let n=this._createPreparedRequest("DELETE",e,r);return this._sendRequest(n,t,s)}patch(e,t,s){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";r=this._getContentType(t,r);let n=this._createPreparedRequest("PATCH",e,r);return this._sendRequest(n,t,s)}abort(){if(this._request)return this._request.abort()}_registerOnLoaded(e,t){t&&e.addEventListener("loadend",()=>{t(e.responseText,e)})}_sendRequest(e,t,s){return this._registerOnLoaded(e,s),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,s){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),s&&this._request.setRequestHeader("Content-type",s),this._request}constructor(){this._request=null}}let m="loader",f={BEFORE:"before",INNER:"inner"};class v{create(){if(!this.exists()){if(this.position===f.INNER){this.parent.innerHTML=v.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),v.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(m));l.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(m)).length>0}_getPosition(){return this.position===f.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(m,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return m}constructor(e,t=f.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}let b=null;class y extends g{static open(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",n=!(arguments.length>4)||void 0===arguments[4]||arguments[4],i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:g.REMOVE_OFF_CANVAS_DELAY(),a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");h._removeExistingOffCanvas();let c=h._createOffCanvas(r,a,o,n);this.setContent(e,t,s,n,i),h._openOffcanvas(c)}static setContent(e,t,s,r,n){let i=new p;super.setContent('<div class="offcanvas-body">'.concat(v.getTemplate(),"</div>"),r,n),b&&b.abort();let a=e=>{super.setContent(e,r,n),"function"==typeof s&&s(e)};b=t?i.post(e,t,y.executeCallback.bind(this,a)):i.get(e,y.executeCallback.bind(this,a))}static executeCallback(e,t){"function"==typeof e&&e(t),window.PluginManager.initializePlugins()}}let E="element-loader-backdrop";class _ extends v{static create(e){e.classList.add("has-element-loader"),_.exists(e)||(_.appendLoader(e),setTimeout(()=>{let t=e.querySelector(".".concat(E));t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(".".concat(E));t&&t.remove()}static exists(e){return e.querySelectorAll(".".concat(E)).length>0}static getTemplate(){return'\n        <div class="'.concat(E,'">\n            <div class="loader" role="status">
1\n                <span class="').concat("visually-hidden",'">Loading...</span>\n            </div>\n        </div>\n        ')}static appendLoader(e){e.insertAdjacentHTML("beforeend",_.getTemplate())}}window.router["frontend.cookie.offcanvas"];class w{supports(e,t){return console.warn("[Google Analytics Plugin] Method 'supports' was not overridden by `"+this.constructor.name+"`. Default return set to false."),!1}execute(){console.warn("[Google Analytics Plugin] Method 'execute' was not overridden by `"+this.constructor.name+"`.")}disable(){this.active=!1}constructor(){this.active=!0}}class C extends w{execute(){let e=this.getEvents();window.PluginManager.getPluginInstances(this.getPluginName()).forEach(t=>{Object.keys(e).forEach(s=>{t.$emitter.subscribe(s,e[s])})})}getEvents(){console.warn("[Google Analytics Plugin] Method 'getEvents' was not overridden by `"+this.constructor.name+"`.")}getPluginName(){console.warn("[Google Analytics Plugin] Method 'getPluginName' was not overridden by `"+this.constructor.name+"`.")}}class O extends C{supports(){return!0}getPluginName(){return"AddToCart"}getEvents(){return{beforeFormSubmit:this._beforeFormSubmit.bind(this)}}_beforeFormSubmit(e){if(!this.active)return;let t=e.detail,s=null;if(t.forEach((e,t)=>{t.endsWith("[id]")&&(s=e)}),!s){console.warn("[codiverse GTM] Product ID could not be fetched. Skipping.");return}let r=this.getProductsObjectFromFormData(t,s),n="add_to_cart";document.querySelector("body").classList.contains("is-ctl-navigation")&&(n="add_to_cart_list"),dataLayer.push({ecommerce:null}),dataLayer.push({event:n,ecommerce:{currency:t.get("dtgs-gtm-currency-code"),value:r.price*r.quantity,items:[r]}})}getProductsObjectFromFormData(e,t){let s={item_name:e.get("product-name"),item_id:e.get("dtgs-gtm-product-sku"),quantity:Number(e.get("lineItems["+t+"][quantity]"))};return null!==e.get("dtgs-gtm-product-variantname")&&Object.assign(s,{item_variant:e.get("dtgs-gtm-product-variantname")}),null!==e.get("dtgs-gtm-product-category")&&Object.assign(s,{item_category:e.get("dtgs-gtm-product-category")}),null!==e.get("dtgs-gtm-product-price")&&Object.assign(s,{price:Number(e.get("dtgs-gtm-product-price"))}),null!==e.get("brand-name")&&Object.assign(s,{item_brand:e.get("brand-name")}),s}}class A extends w{supports(){return!0}execute(){document.addEventListener("click",this._onRemoveFromCart.bind(this))}_onRemoveFromCart(e){if(!this.active||!e.target.closest(".line-item-remove-button"))return;let t=n.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-product-sku]");if(!t)return;let s=n.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-product-name]");dataLayer.push({ecommerce:null}),dataLayer.push({event:"remove_from_cart",ecommerce:{items:[{item_id:t.value,item_name:s.value}]}})}}window.PluginManager.register("GoogleTagManager",class extends a{init(){this.cookieEnabledName="dtgsAllowGtmTracking",this.cookieAdsEnabledName="google-ads-enabled",this.handleCookieChangeEvent(),this.startGoogleTagManager(),o.getItem(this.cookieEnabledName)&&this.fireCookieConsentEvent()}fireCookieConsentEvent(){window.dataLayer.push({event:"cookieConsentGiven"})}fireSelectItemEvent(e){let t=e.target.closest(".card-body"),s=t.querySelector('input[name="product-name"]').value,r=t.querySelector('input[name="dtgs-gtm-product-sku"]').value;dataLayer.push({ecommerce:null}),dataLayer.push({event:"select_item",ecommerce:{item_list_name:"Category",items:[{item_id:r,item_name:s}]}})}startGoogleTagManager(){this.controllerName=window.controllerName,this.actionName=window.actionName,this.events=[],this.registerDefaultEvents(),this.handleEvents()}handleEvents(){this.events.forEach(e=>{e.supports(this.controllerName,this.actionName)&&e.execute()})}registerDefaultEvents(){this.registerEvent(O),this.registerEvent(A),document.querySelectorAll("a.product-name, a.product-image-link, a.product-button-detail").forEach(e=>{e.addEventListener("click",this.fireSelectItemEvent)})}registerEvent(e){this.events.push(new e)}handleCookieChangeEvent(){document.$emitter.subscribe("CookieConfiguration_Update",this.handleCookies.bind(this))}handleCookies(e){let t=e.detail;if(this.updateConsentMode(t),t.hasOwnProperty(this.cookieEnabledName)){if(t[this.cookieEnabledName]){this.fireCookieConsentEvent();return}this.removeCookies(),this.disableEvents()}}
1removeCookies(){let e=document.cookie.split(";"),t=/^(_ga|_gat_UA$|_gid)/;e.forEach(e=>{let s=e.split("=")[0].trim();s.match(t)&&o.removeItem(s)})}disableEvents(){this.events.forEach(e=>{e.disable()})}updateConsentMode(e){if(0===Object.keys(e).length)return;let t={};Object.prototype.hasOwnProperty.call(e,this.cookieEnabledName)&&(t.analytics_storage=e[this.cookieEnabledName]?"granted":"denied"),Object.prototype.hasOwnProperty.call(e,this.cookieAdsEnabledName)&&(t.ad_storage=e[this.cookieAdsEnabledName]?"granted":"denied",t.ad_user_data=e[this.cookieAdsEnabledName]?"granted":"denied",t.ad_personalization=e[this.cookieAdsEnabledName]?"granted":"denied"),0!==Object.keys(t).length&&gtag("consent","update",t)}})})()})();

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.