!function(){"use strict";const t="preco_seq_";function e(e,o){try{localStorage.setItem(t+e,JSON.stringify(o))}catch(t){}}function o(t,e){t.querySelectorAll("[data-list-id]").forEach(function(t){t.style.display=t.getAttribute("data-list-id")===e?"":"none"})}function a(t){t.querySelectorAll(".preco-recommendations").forEach(function(t){t.style.display=""})}function n(n){const c=n.getAttribute("data-location-key")||"";if(!c)return;let i;try{i=JSON.parse(n.getAttribute("data-display-rules")||"[]")}catch(t){return void a(n)}if(!Array.isArray(i)||0===i.length)return void a(n);const r=Date.now(),s=Math.floor(r/1e3);let l=function(e){try{const o=localStorage.getItem(t+e);if(o){const t=JSON.parse(o);if(t&&"object"==typeof t)return t}}catch(t){}return null}(c);const d=i.find(t=>"show_instantly"===t.frequency)?.id;l&&"number"==typeof l.lastVisitTimestamp?r-1e3*l.lastVisitTimestamp>18e5&&(l.pageReloadCount=0):l={lastVisitTimestamp:s,pageReloadCount:0,selected:d||""},l.lastVisitTimestamp=s,l.pageReloadCount=(l.pageReloadCount||0)+1;let u="";const f=[];for(const t of i)if(n.querySelector('[data-list-id="'+t.id+'"]'))if("show_instantly"===t.frequency)u=t.id;else if("page_reloads"===t.frequency)(parseInt(t.frequencyValue,10)||0)<=l.pageReloadCount-1&&(u=t.id);else if("after_delay"===t.frequency){const e=1e3*(parseFloat(t.frequencyValue)||0);e>0&&f.push({id:t.id,delayMs:e})}u&&(l.selected=u,o(n,u)),e(c,l),f.forEach(({id:t,delayMs:a})=>{setTimeout(function(){l.selected=t,e(c,l),o(n,t)},a)})}function c(){const e=document.querySelectorAll("[data-preco-seq-location]"),o=new Set;e.forEach(t=>{const e=t.getAttribute("data-location-key");e&&o.add(e)}),function(e){try{const o=[];for(let a=0;a<localStorage.length;a++){const n=localStorage.key(a);if(n&&n.startsWith(t)){const t=n.slice(10);e.has(t)||o.push(n)}}o.forEach(t=>localStorage.removeItem(t))}catch(t){}}(o),e.forEach(n)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c()}();