"use strict";(globalThis.webpackChunkblocksy_companion=globalThis.webpackChunkblocksy_companion||[]).push([[407],{407:function(e,t,r){r.d(t,{u:function(){return u},O:function(){return a}});var n=r(705);const o=["isExpired"];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 i(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.A)(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}const u=function(){const e=JSON.parse(localStorage.getItem("blocksyPastPopups"));let 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){const n=t[r],{isExpired:c}=n,u=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,o);return i(i({},e),{},{[r]:i(i({},u),u.closed?{}:{closed:c?{reason:"cancel",timestamp:(new Date).getTime()}:null})})},{}),t||{}},a=function(e){let t=e.id.replace("ct-popup-","");const r=u()[t];if(e.dataset.popupRelaunch){if("always"===e.dataset.popupRelaunch)return!1;if(e.dataset.popupRelaunch.indexOf("custom")>-1&&r){const t=e.dataset.popupRelaunch.split(":");let n=0,o=0;t.length>1&&(n=parseInt(t[1]),o=n),t.length>2&&(o=parseInt(t[2]));const{closed:c}=r;if(!c||!c.timestamp)return!1;const i=("cancel"===c.reason?n:o)/60/24;return!((new Date-new Date(c.timestamp))/864e5>i)}}return r&&r.closed}},705:function(e,t,r){function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function c(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{A:function(){return c}})}}]);