window.pxl_init=function(){var o="pxluid",r=540,a="pxlsid",w=window.location.hostname,g="-";window.pxl_getcookie=function(e){var t=("; "+document.cookie).split("; "+e+"=");if(2==t.length)return t.pop().split(";").shift()},window.pxl_setcookie=function(e,t,n,i,o){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var a="expires="+r.toUTCString();document.cookie=e+"="+t+";"+a+";path="+i+";domain="+o+";secure;samesite=lax"},window.pxl_setsid=function(){var e=Math.floor(1e8+9e8*Math.random()).toString(),t=(new Date).setTime((new Date).getTime()+18e5).toString(),n=e+g+t;return window.pxl_setcookie(a,n,.5/24,"/",w),e},window.pxl_checksid=function(){if(void 0===window.pxl_getcookie(a))return window.pxl_setsid();var e=window.pxl_getcookie(a),t=e.split(g)[0],n=parseInt(e.split(g)[1]);if(void 0!==n&&new Date(n)new Date){var i=t+g+(new Date).setTime((new Date).getTime()+18e5).toString();return window.pxl_setcookie(a,i,.5/24,"/",w),t}return window.pxl_setsid()},window.pxl_setuid=function(){var e="U"+Math.floor(1e8+9e8*Math.random()).toString()+g+(new Date).setTime((new Date).getTime()).toString(),t=(new Date).setTime((new Date).getTime()+46656e6).toString(),n=e+g+t;return window.pxl_setcookie(o,n,540,"/",w),e},window.pxl_checkuid=function(){if(void 0===window.pxl_getcookie(o))return window.pxl_setuid();var e=window.pxl_getcookie(o),t=e.split(g)[0]+g+e.split(g)[1],n=parseInt(e.split(g)[2]);if(void 0!==n&&new Date(n)new Date){var i=t+g+(new Date).setTime((new Date).getTime()+44712e6).toString();return window.pxl_setcookie(o,i,r,"/",w),t}return window.pxl_setuid()},window.pxl_event=function(e,t,n,i){for(var o,r=n||{},a=t||{},w=i||{},s={},d=(d=window.location.search).split("+").join(" "),p=/[?&]?([^=]+)=([^&]*)/g;o=p.exec(d);)s[decodeURIComponent(o[1])]=decodeURIComponent(o[2]);var c=pxl_getcookie("_ga")||"",l={pxleid:pxl_checksid()+g+Math.floor(1e8+9e8*Math.random()).toString(),pxlsid:pxl_checksid(),pxluid:pxl_checkuid(),event:e||"",timestamp:(new Date).toISOString(),location:window.location.pathname,host:window.location.host,screen_height:screen.height||"",screen_width:screen.width||"",color_depth:screen.colorDepth||"",referrer:document.referrer||"",orientation:screen.orientation.type||"",user_agent:navigator.userAgent||"",language:navigator.language||"",browser:navigator.vendor||"",ga_cid:c,user:r,event_params:a,query_params:s,ecommerce:w},u=new XMLHttpRequest;u.open("POST","https://europe-west3-kernel-connectors.cloudfunctions.net/pxl_ultimo_log",!0),u.setRequestHeader("Content-Type","application/json"),u.send(JSON.stringify(l))}},pxl_init();