{"size": 12343, "ext": "js", "max_stars_repo_path": "dist/showcar-tracking.js", "max_stars_repo_name": "ctoutountzidis/showcar-ui", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dist/showcar-tracking.js", "max_issues_repo_name": "ctoutountzidis/showcar-ui", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/showcar-tracking.js", "max_forks_repo_name": "ctoutountzidis/showcar-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 6171.5, "max_line_length": 12298, "alphanum_fraction": 0.6941586324}
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=22)}([function(t,e){function n(t,e){return t?(e&&e.decodingFunction||decodeURIComponent)(a.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null:null}function r(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}function o(t,e){return!i(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 i(t){return!!t&&new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)}var a=document;t.exports={read:n,set:r,remove:o}},function(t,e){function n(t){return t&&(""+t).toLowerCase()}var r=window.dataLayer=window.dataLayer||[],o=window.location.href.indexOf("tracking-arrays=true")>=0;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)o&&"string"!=typeof t[e]||(t[e]=n(t[e]));return t}),r.push.apply(r,t)}}}},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"===t[0]?(e=i[t[1]],n=t.slice(2),"function"==typeof e&&e.apply(i,n)):"dealerTatsu"===t[0]?(e=a[t[1]],n=t.slice(2),"function"==typeof e&&e.apply(a,n)):"dealer-gtm"===t[0]&&(e=c[t[1]],n=t.slice(2),"function"==typeof e&&e.apply(c,n))},o=n(19),i=n(13),a=n(14),c=n(12),u=window.ut||(window.ut=[]);u.push===Array.prototype.push&&(u.push=function(){Array.prototype.push.apply(window.ut,arguments),r.apply({},arguments)},u.forEach(r)),n(21),t.exports={gtm:o,dealer:i,dealerTatsu:a,ut:u}}},function(t,e,n){var r=n(7);t.exports=function(t){if(!r(t))return t;for(var e,n,o=1,i=arguments.length;o<i;o++){e=arguments[o];for(n in e)t[n]=e[n]}return t}},function(t,e,n){var r=n(6);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 Date]"===n.call(t)}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return"[object Number]"===n.call(t)}},function(t,e){var 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.exports=function(t){var e=void 0===t?"undefined":n(t);return!!t&&("function"===e||"object"===e)}},function(t,e,n){var r=n(3);t.exports=function(){var t=[].slice.call(arguments);return t.unshift({}),r.apply(this,t)}},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"),h=g.indexOf(n);h>=0?(l=g.substr(0,h),m=g.substr(h+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,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 o="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},i=function(t){switch(void 0===t?"undefined":o(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"===(void 0===t?"undefined":o(t))?r(c(t),function(o){var c=encodeURIComponent(i(o))+n;return a(t[o])?r(t[o],function(t){return c+encodeURIComponent(i(t))}).join(e):c+encodeURIComponent(i(t[o]))}).join(e):u?encodeURIComponent(i(u))+n+encodeURIComponent(i(t)):""};var a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},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){"use strict";e.decode=e.parse=n(9),e.encode=e.stringify=n(10)},function(t,e){function n(t){o.push(t)}function r(){window.dataLayer=window.dataLayer||[],window.dataLayer.push({list_productidsall:o}),o=[]}var o=[];t.exports={add:n,commit:r}},function(t,e,n){function r(t){if(i){t.visitor=i,t.ticks=+new Date;var e=Object.keys(t).map(function(e){return e+"="+encodeURIComponent(t[e])}).join("&");(new Image).src="https://tracking.autoscout24.com/parser.ashx?"+e}}var o=n(0),i=o.read("as24Visitor");t.exports={listview:function(t){r({id:t.join("|"),source:"lv",url:"/"})},detailview:function(t){var e=document.createElement("a");e.href=t||location.href;var n=e.pathname.match(/-([\d]+)$/i);if(n&&2===n.length){var o=n[1];r({source:"pv",url:t||location.href,id:o})}},topcarview:function(){var t=location.pathname.match(/-([\d]+)$/i);if(t&&2===t.length){var e=t[1];r({source:"ha",url:location.href,id:e})}},phone:function(){var t=location.pathname.match(/-([\d]+)$/i);if(t&&2===t.length){var e=t[1];r({source:"mc",url:location.href,id:e})}}}},function(t,e,n){function r(t){if(i){t.visitor=i,t.ticks=+new Date;var e=Object.keys(t).map(function(e){return e+"="+encodeURIComponent(t[e])}).join("&");(new Image).src="https://tracking.autoscout24.com/parser.ashx?"+e}}var o=n(0),i=o.read("as24Visitor");t.exports={listview:function(t){r({id:t.join("|"),source:"lv",url:location.href})},detailview:function(t){r({id:t,source:"pv",url:location.href})},topcarview:function(t){r({id:t,source:"ha",url:location.href})},phone:function(t){r({id:t,source:"mc",url:location.href})}}},function(t,e,n){function r(t){var e=+new Date,n={name:t,date:new Date(0),content:[],firstVisit:null,currentVisit:null,lastPaidVisit:null,isValid:function(){return a(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-u*s&&(t.campaign_lastPaidMedium=this.lastPaidVisit[0],t.campaign_lastPaidSource=this.lastPaidVisit[1],t.campaign_lastPaidCampaign=this.lastPaidVisit[2]),t},updateCurrentVisit:function(){var t=c.getParameters(location.search);this.currentVisit=[t.medium,t.source,t.campaign,e],this.firstVisit=this.firstVisit||this.currentVisit,c.isPaidChannel(t.medium)&&(this.lastPaidVisit=this.currentVisit),this.content=[this.firstVisit,this.lastPaidVisit,this.currentVisit]}};try{var r=i.read(t);if(!r)return n;var o=new Date(+r.substring(0,13));if(!a(o))return n;n.date=o;var p=r.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 p&&3===p.length||(p=[]),n.firstVisit=p[0],n.lastPaidVisit=p[1],n.currentVisit=p[2],n.content=p,n}catch(t){return n}}function o(t){var e=+new Date,n="."+location.hostname.split(".").slice(-2).join("."),r=e+""+t.content.slice(0,3).join("#"),o={expires:24*u*60*60,path:"/",domain:location.hostname.indexOf("localhost")>=0?"":n};i.set(t.name,r,o)}var i=n(0),a=n(5),c=n(17),u=90,s=864e5;t.exports={read:r,write:o}},function(t,e,n){function r(){var t=i.read("cmpatt");t.updateCurrentVisit(),o.push(t.getGtmData()),i.write(t)}var o=n(1),i=n(15);t.exports={updateCampaignCookie:r}},function(t,e,n){var r=n(11),o=n(4);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){var e=["aff","co","med","email","ret","cpc","print","gclid"];return!!(t&&o(e,t)>=0)}}},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,n){function r(t){c=t}function o(t){var e=u({},c,t);if(!(e&&e.country&&e.market&&e.category&&e.pageid))throw new Error("Incorrect pagename");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 i(t){s.push(o(t)),s.push({event:"click"})}function a(t){m&&s.push(l),s.push(o(t)),setTimeout(function(){m?(s.loadContainer(p),n(16).updateCampaignCookie(),s.push({event:"common_data_ready"}),s.push({event:"data_ready"}),m=!1):s.push({event:"pageview"})},10)}var c,u=n(8),s=n(1),p=n(18)(location.hostname),l=n(20),m=!0;t.exports={setPagename:r,trackClick:i,set:s.push,pageview:a,click:i}},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){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"],createdCallback:function(){var t=this,e=this.getAdditionalProperties(),n=this.getAttribute("type"),r=this.getAttribute("action"),o=[n,r];Object.keys(e).length>0&&o.push(e),"pagename"===n&&o.splice(1,1);var i=this.getAttribute("as24-tracking-click-target");if(i)for(var a=document.querySelectorAll(i),c=0;c<a.length;c++)a[c].addEventListener("click",function(){return t.track(o)});else this.track(o)},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):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)}},function(t,e,n){var r=document.createElement("as24-tracking").constructor;r!==HTMLElement&&r!==HTMLUnknownElement||n(2)}]);
//# sourceMappingURL=showcar-tracking.js.map