showcar-ui
Version:
Showcar-ui is the pattern library that is used to build the frontend of AutoScout24. It provides CSS classes, custom elements and components.
2 lines • 11.6 kB
JavaScript
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=23)}([,function(t,e){var n=window.dataLayer=window.dataLayer||[],r=window.location.href.indexOf("tracking-arrays=true")>=0;function o(t){return t&&(""+t).toLowerCase()}t.exports={loadContainer:function(t){document.documentElement.className.indexOf("gtm-main-container-load-initiated")>=0||(document.documentElement.className+=" gtm-main-container-load-initiated",function(t,e,n,r,o){t[r]=t[r]||[],t[r].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var i=e.getElementsByTagName(n)[0],a=e.createElement(n);a.async=!0,a.src="//www.googletagmanager.com/gtm.js?id="+o,i.parentNode.insertBefore(a,i)}(window,document,"script","dataLayer",t))},push:function(){if(arguments.length){var t=[].slice.call(arguments);t.map((function(t){for(var e in t)r&&"string"!=typeof t[e]||(t[e]=o(t[e]));return t})),n.push.apply(n,t)}}}},,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var r=document.createElement("as24-tracking").constructor;r!==HTMLElement&&r!==HTMLUnknownElement||n(24)},function(t,e,n){if(location.hash.indexOf("tracking-off=true")<0){var r=function(t){var e,n;"pagename"===t[0]&&o.setPagename(t[1]),"gtm"===t[0]?(e=o[t[1]],n=t.slice(2),"function"==typeof e&&e.apply(o,n)):"dealer-gtm"===t[0]&&(e=i[t[1]],n=t.slice(2),"function"==typeof e&&e.apply(i,n))},o=n(25),i=n(41),a=window.ut||(window.ut=[]);a.push===Array.prototype.push&&(a.push=function(){Array.prototype.push.apply(window.ut,arguments),r.apply({},arguments)},a.forEach(r)),n(42),t.exports={gtm:o,ut:a}}},function(t,e,n){var r,o=n(26),i=n(1),a=n(29)(location.hostname),c=n(30);function u(t){var e=o({},r,t);if(!(e&&e.country&&e.market&&e.category&&e.pageid&&e.environment)){if("test"!==e.environment||"live"!==e.environment)throw new Error("Invalid environment type, "+JSON.stringify(e));throw new Error("Incorrect pagename, "+JSON.stringify(e))}var n=[e.country,e.market,e.category,e.group,e.pageid].filter((function(t){return t})).join("/");return e.layer&&(n+="|"+e.layer),{common_country:e.country,common_market:e.market,common_category:e.category,common_pageid:e.pageid,common_pageName:n,common_environment:e.environment,common_language:e.language||"",common_group:e.group||"",common_layer:e.layer||"",common_attribute:e.attribute||"",common_linkgroup:e.linkgroup||"",common_linkid:e.linkid||"",common_techState:e.techState||""}}function s(t){t.eventcategory&&t.eventaction?i.push({event:"event_trigger",event_category:t.eventcategory,event_action:t.eventaction,event_label:t.eventlabel||"",event_non_interaction:!1}):(i.push(u(t)),i.push({event:"click"}))}var p=!0;t.exports={setPagename:function(t){r=t},trackClick:s,set:i.push,pageview:function(t){p&&i.push(c),i.push(u(t)),setTimeout((function(){p?(i.loadContainer(a),n(31).updateCampaignCookie(),i.push({event:"common_data_ready"}),i.push({event:"data_ready"}),p=!1):i.push({event:"pageview"})}),10)},click:s}},function(t,e,n){var r=n(27);t.exports=function(){var t=[].slice.call(arguments);return t.unshift({}),r.apply(this,t)}},function(t,e,n){var r=n(28);t.exports=function(t){if(!r(t))return t;for(var e,n,o=1,i=arguments.length;o<i;o++)for(n in e=arguments[o])t[n]=e[n];return t}},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=n(t);return!!t&&("function"===e||"object"===e)}},function(t,e){var n={de:"GTM-MK57H2",at:"GTM-WBZ87G",be:"GTM-5BWB2M",lu:"GTM-NDBDCZ",es:"GTM-PS6QHN",fr:"GTM-PD93LD",it:"GTM-WTCSNR",nl:"GTM-TW48BJ",com:"GTM-KWX9NX"};t.exports=function(t){var e=t.split(".").pop();return n[e]||n.com}},function(t,e){var n=Math.min(document.documentElement.clientWidth,window.innerWidth||screen.width);t.exports={session_viewport:n>=994?"l":n>=768?"m":n>=480?"s":"xs"}},function(t,e,n){var r=n(1),o=n(32);t.exports={updateCampaignCookie:function(){var t=o.read("cmpatt");t.updateCurrentVisit(),r.push(t.getGtmData()),o.write(t)}}},function(t,e,n){var r=n(33),o=n(34),i=n(35);t.exports={read:function(t){var e=+new Date,n={name:t,date:new Date(0),content:[],firstVisit:null,currentVisit:null,lastPaidVisit:null,isValid:function(){return o(this.date)&&this.content&&3===this.content.length},getGtmData:function(){var t={};return t.campaign_directMedium=this.currentVisit[0],t.campaign_directSource=this.currentVisit[1],t.campaign_directCampaign=this.currentVisit[2],this.lastPaidVisit&&this.lastPaidVisit[3]>e-7776e6&&(t.campaign_lastPaidMedium=this.lastPaidVisit[0],t.campaign_lastPaidSource=this.lastPaidVisit[1],t.campaign_lastPaidCampaign=this.lastPaidVisit[2]),t},updateCurrentVisit:function(){var t=i.getParameters(location.search);this.currentVisit=[t.medium,t.source,t.campaign,e],this.firstVisit=this.firstVisit||this.currentVisit,i.isPaidChannel(t.medium)&&(this.lastPaidVisit=this.currentVisit),this.content=[this.firstVisit,this.lastPaidVisit,this.currentVisit]}};try{var a=r.read(t);if(!a)return n;var c=new Date(+a.substring(0,13));if(!o(c))return n;n.date=c;var u=a.substring(13).split("#").map((function(t){if(!t)return null;var e=t.split(",");return e[3]=e[3]&&parseInt(e[3],10),e}));return u&&3===u.length||(u=[]),n.firstVisit=u[0],n.lastPaidVisit=u[1],n.currentVisit=u[2],n.content=u,n}catch(t){return n}},write:function(t){var e=+new Date,n="."+location.hostname.split(".").slice(-2).join("."),o=e+""+t.content.slice(0,3).join("#"),i={expires:7776e3,path:"/",domain:location.hostname.indexOf("localhost")>=0?"":n};r.set(t.name,o,i)}}},function(t,e){var n=document;t.exports={read:function(t,e){return t&&(e&&e.decodingFunction||decodeURIComponent)(n.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},set:function(t,e,n){if(!t||/^(?:expires|max\-age|path|domain|secure)$/i.test(t))return!1;var r="";if(n.expires){var o=new Date;o.setTime(+o+n.expires),r="; expires="+o.toGMTString()}return n.encodingFunction=n.encodingFunction||encodeURIComponent,document.cookie=encodeURIComponent(t)+"="+n.encodingFunction(e)+r+(n.domain?"; domain="+n.domain:"")+(n.path?"; path="+n.path:"")+(n.secure?"; secure":""),!0},remove:function(t,e){return!function(t){if(!t)return!1;return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)}(t)&&(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(t?"; domain="+e.domain:"")+(e.path?"; path="+e.path:""),!0)}}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return"[object Date]"===n.call(t)}},function(t,e,n){var r=n(36),o=n(39);t.exports={getParameters:function(t){var e=r.parse(t.replace("?",""))||{},n={medium:e.gclid?"gclid":e.utm_medium||"",source:e.utm_source||"",campaign:e.utm_campaign||""};return n.medium||(n.medium="direct",n.source="direct",n.campaign="direct"),n},isPaidChannel:function(t){return!!(t&&o(["aff","co","med","email","ret","cpc","print","gclid"],t)>=0)}}},function(t,e,n){"use strict";e.decode=e.parse=n(37),e.encode=e.stringify=n(38)},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,i){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var c=/\+/g;t=t.split(e);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var s=t.length;u>0&&s>u&&(s=u);for(var p=0;p<s;++p){var l,m,d,f,g=t[p].replace(c,"%20"),y=g.indexOf(n);y>=0?(l=g.substr(0,y),m=g.substr(y+1)):(l=g,m=""),d=decodeURIComponent(l),f=decodeURIComponent(m),r(a,d)?o(a[d])?a[d].push(f):a[d]=[a[d],f]:a[d]=f}return a};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){switch(r(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,u){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===r(t)?a(c(t),(function(r){var c=encodeURIComponent(o(r))+n;return i(t[r])?a(t[r],(function(t){return c+encodeURIComponent(o(t))})).join(e):c+encodeURIComponent(o(t[r]))})).join(e):u?encodeURIComponent(o(u))+n+encodeURIComponent(o(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var c=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){var r=n(40);t.exports=function(t,e,n){var o=0,i=t&&t.length;for(r(n)&&(o=n<0?Math.max(0,i+n):n);o<i;o++)if(t[o]===e)return o;return-1}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return"[object Number]"===n.call(t)}},function(t,e){var n=[];t.exports={add:function(t){n.push(t)},commit:function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({list_productidsall:n}),n=[]}}},function(t,e){var n=Object.assign(Object.create(HTMLElement.prototype),{inDev:!1,supportedActions:["set","click","pageview"],supportedTypes:["gtm","pagename"],reservedWords:["type","action","as24-tracking-value","as24-tracking-click-target"],attachedCallback:function(){var t=this,e=this.getAdditionalProperties(),n=this.getAttribute("type"),r=[n,this.getAttribute("action")];Object.keys(e).length>0&&r.push(e),"pagename"===n&&r.splice(1,1);var o=this.getAttribute("as24-tracking-click-target");if(o)for(var i=document.querySelectorAll(o),a=0;a<i.length;a++)i[a].addEventListener("click",(function(){return t.track(r)}));else this.track(r)},getAdditionalProperties:function(){var t=this,e=this.getAttribute("as24-tracking-value"),n=e?JSON.parse(e):{};return Array.isArray(n)?n:Array.prototype.slice.call(this.attributes).filter((function(e){return!(t.reservedWords.indexOf(e.nodeName)>-1)})).reduce((function(e,n){return e[t.decodeAttributeName(n.nodeName)]=n.nodeValue,e}),n)},decodeAttributeName:function(t){return t.indexOf("-")>-1&&(t=t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))),t},track:function(t){this.inDev?console.log(t):(window.ut=window.ut||[],window.ut.push(t))}});try{var r=document.createElement("as24-tracking").constructor;r!==HTMLElement&&r!==HTMLUnknownElement||document.registerElement("as24-tracking",{prototype:n})}catch(t){window&&window.console&&window.console.warn('Failed to register CustomElement "as24-tracking".',t)}}]);
//# sourceMappingURL=showcar-tracking.js.map