"use strict";(globalThis.webpackChunkblocksy_companion=globalThis.webpackChunkblocksy_companion||[]).push([[806],{806:function(e,t,r){r.d(t,{Q:function(){return u},R:function(){return i}});var n=r(942);function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=JSON.parse(localStorage.getItem("blocksyPastPopups")),t={};return Array.isArray(e)?e.forEach((function(e){t[e]={closed:{reason:"cancel",timestamp:(new Date).getTime()},pages:[]}})):t=e,(t=Object.keys(t||{}).reduce((function(e,r){var c=t[r],u=c.isExpired,i=o(c,["isExpired"]);return a(a({},e),{},(0,n.Z)({},r,a(a({},i),i.closed?{}:{closed:u?{reason:"cancel",timestamp:(new Date).getTime()}:null})))}),{}))||{}},i=function(e){var t=e.id.replace("ct-popup-",""),r=u()[t];if(e.dataset.popupRelaunch&&e.dataset.popupRelaunch.indexOf("custom")>-1&&r){var n=e.dataset.popupRelaunch.split(":"),o=0,c=0;n.length>1&&(c=o=parseInt(n[1])),n.length>2&&(c=parseInt(n[2]));var a=r.closed;if(!a||!a.timestamp)return!1;var i="cancel"===a.reason?o:c;return!((new Date-new Date(a.timestamp))/864e5>i)}return r&&r.closed}},942:function(e,t,r){function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{Z:function(){return n}})}}]);