"use strict"; function _createForOfIteratorHelper(t, e) { var o; if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) { if (Array.isArray(t) || (o = _unsupportedIterableToArray(t)) || e && t && "number" == typeof t.length) { o && (t = o); var i = 0, n = function() {}; return { s: n, n: function() { return i >= t.length ? { done: !0 } : { done: !1, value: t[i++] } }, e: function(t) { throw t }, f: n } } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") } var c, a = !0, r = !1; return { s: function() { o = t[Symbol.iterator]() }, n: function() { var t = o.next(); return a = t.done, t }, e: function(t) { r = !0, c = t }, f: function() { try { a || null == o.return || o.return() } finally { if (r) throw c } } } } function _unsupportedIterableToArray(t, e) { if (t) { if ("string" == typeof t) return _arrayLikeToArray(t, e); var o = Object.prototype.toString.call(t).slice(8, -1); return "Object" === o && t.constructor && (o = t.constructor.name), "Map" === o || "Set" === o ? Array.from(t) : "Arguments" === o || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o) ? _arrayLikeToArray(t, e) : void 0 } } function _arrayLikeToArray(t, e) { (null == e || e > t.length) && (e = t.length); for (var o = 0, i = new Array(e); o < e; o++) i[o] = t[o]; return i } function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } function _defineProperties(t, e) { for (var o = 0; o < e.length; o++) { var i = e[o]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i) } } function _createClass(t, e, o) { return e && _defineProperties(t.prototype, e), o && _defineProperties(t, o), t }! function n(c, a, r) { function s(o, t) { if (!a[o]) { if (!c[o]) { var e = "function" == typeof require && require; if (!t && e) return e(o, !0); if (l) return l(o, !0); throw new Error("Cannot find module '" + o + "'") } var i = a[o] = { exports: {} }; c[o][0].call(i.exports, function(t) { var e = c[o][1][t]; return s(e || t) }, i, i.exports, n, c, a, r) } return a[o].exports } for (var l = "function" == typeof require && require, t = 0; t < r.length; t++) s(r[t]); return s }({ 1: [function(t, e, o) { window.hook = function() { return !1 }, new(function() { function t() { _classCallCheck(this, t), this.ver = "1.8_driver", this.scriptTagSRC = document.querySelector("#cookiescript").src, this.barConfig = { enabledCookie: navigator.cookieEnabled, countryCode: this.getParameterByName("countrycode") ? this.getParameterByName("countrycode").toLowerCase() : "en_ww", assetsPath: this.scriptTagSRC.split("/".concat(this.ver, "/"))[0], GTMcontainers: this.getParameterByName("gtmcontainer") ? this.getParameterByName("gtmcontainer").replace(/\ /g, "").replace(/\%20/g, "").split(",") : "", loadCss: !this.getParameterByName("nocss"), domain: window.location.hostname.replace("www.", "."), customClass: this.getParameterByName("customclass") || "", customData: this.getParameterByName("customdata") ? "".concat(this.getParameterByName("customdata"), "/") : "", forceCookies: this.getParameterByName("forcecookies") ? "".concat(this.getParameterByName("forcecookies")) : "0" }, this.firstTime = !0, this.barConfig.loadCss && this.createCSSTag(), this.deleteOldCookies(), this.eventHandler() } return _createClass(t, [{ key: "deleteOldCookies", value: function() { var e = this, t = document.cookie.split("; ").filter(function(t) { return 0 === t.indexOf("cpc_") }).map(function(t) { return t.split("=")[0] }), o = t.filter(function(t) { return !JSON.parse(e.getCookie(t)).version || JSON.parse(e.getCookie(t)).version < 1.8 }); t.forEach(function(t) { document.cookie = "".concat(t, "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=.author-wcs.pirelli.com;path=/"), document.cookie = "".concat(t, "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=.www-uat.pirelli.com;path=/") }), o.forEach(function(t) { document.cookie = "".concat(t, "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(window.location.hostname, ";path=/"), document.cookie = "".concat(t, "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=.").concat(window.location.hostname, ";path=/"), document.cookie = "".concat(t, "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=.").concat(window.location.hostname.replace("www.", ""), ";path=/"), document.cookie = "".concat(t, "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=.pirelli.com;path=/"), document.cookie = "".concat(t, "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=.www.pirelli.com;path=/") }), this.barConfig.enabledCookie ? window.location.hostname.indexOf("author-wcs") < 0 && window.location.hostname.indexOf("www-uat") < 0 || "el_gr" === this.barConfig.countryCode || "pt_pt" === this.barConfig.countryCode || "1" === this.barConfig.forceCookies ? this.getCookie("cpc_".concat(this.barConfig.countryCode)) && localStorage.getItem("countryConfig_".concat(this.barConfig.countryCode)) ? this.retriveFromLocal() : this.retriveFromServer() : this.gtmContainerFactory() : this.retriveFromServer(), this.eventHandler() } }, { key: "retriveFromServer", value: function() { var e = this; this.xhrget("".concat(this.barConfig.assetsPath,"/").concat(this.ver,"/","cookie_config_").concat(this.barConfig.countryCode,".json")).then(function(t){ e.countryConfig = JSON.parse(t), e.barConfig.enabledCookie && localStorage.setItem("countryConfig_".concat(e.barConfig.countryCode), t); e.createAndPushPolicyObject(!0), e.gtmContainerFactory(), window.location.href.indexOf("cookie-policy") < 0 && !e.getCookie("cpc_".concat(e.barConfig.countryCode)) && (e.barConfig.enabledCookie, e.cookieBarFactory(!0), e.cookieBarShow()) }).catch(function(t) { console.log("ERR", t) }) } }, { key: "retriveFromLocal", value: function() { this.countryConfig = JSON.parse(localStorage.getItem("countryConfig_".concat(this.barConfig.countryCode))); this.createAndPushPolicyObject(!1), this.gtmContainerFactory() } }, { key: "cookieBarFactory", value: function(t) { this.barConfig.enabledCookie ? (this.cookieBarFactoryStructure(), this.cookieBarFactoryList(t), this.cookieBarEventHandler()) : (this.disabledCookieFactoryStructure(), this.disabledCookieEventHandler()) } }, { key: "disabledCookieFactoryStructure", value: function() { var t = this.countryConfig.no_cookie, e = document.createElement("div"); e.id = "cookie-bar", this.barConfig.customClass && e.classList.add(this.barConfig.customClass), e.innerHTML = '
\n "), document.body.appendChild(e) } }, { key: "disabledCookieEventHandler", value: function() { var t = this; document.querySelector("#cookie-intro .noCookieClose").addEventListener("click", function() { t.cookieBarHide() }) } }, { key: "cookieBarFactoryStructure", value: function() { var t, e, o = document.createElement("div"), i = this; o.id = "cookie-bar", this.barConfig.customClass && o.classList.add(this.barConfig.customClass), o.innerHTML = ' \n "), document.body.appendChild(o), "pirellicare" === this.barConfig.customClass && (t = document.querySelector("#cookie-bar .descText a"), e = this.barConfig.countryCode.split("_")[0].toUpperCase() + this.barConfig.countryCode.slice(2), t.href = "https://assets.pirellicare.com/docs/legal/PirelliCare_CP_" + e + ".html"), this.countryConfig.closeIcon && document.getElementById("cookieCloseIcon").addEventListener("click", function() { i.savePreferences(!1) }) } }, { key: "cookieBarFactoryList", value: function(i) { var n = this, c = ""; this.countryConfig.cookie_typology.map(function(t) { var e = i ? t.state ? "checked" : "" : "optin" === n.cookiePolicy[t.type + "_policy"] ? "checked" : "", o = ''); c += '