1import{setStorage as l,getStorage as f,getUrlParamsFromStorage as v,updateCart as h,SHEET_ID_PREFIX as u}from"woody_addon_favorites_tools";async function S(o){const t=f(),e=y("fav");e!==null&&e.split("-").forEach(function(c){const s=c.split(":");if(s[0]==="f"){const r=w(o);let d=s[1].split(",");d=d.filter(a=>a!==""),d.forEach(function(a){r.includes(a)?t[a]="f":delete t[a]}),l(t)}});const i=v();i!=""&&e!=i&&(window.location=window.location.origin+window.location.pathname+"?fav="+i)}function w(o){let t=[];return o.querySelectorAll(".card").forEach(function(e){const i=e.dataset.sheetid?u+e.dataset.sheetid:e.dataset.postid;t.push(i)}),t}function F(o){o.querySelectorAll(".card").forEach(function(t){const e=t.dataset.sheetid?u+t.dataset.sheetid:t.dataset.postid;p(e,t)})}function _(o){o.querySelectorAll(".card").forEach(function(t){const e=t.dataset.sheetid?u+t.dataset.sheetid:t.dataset.postid;p(e,t),g(e,t)})}async function p(o,t){const e=document.createElement("div");e.classList.add("removeFavorites"),e.innerHTML=window.removeFavorites,t.insertBefore(e,t.firstChild),e.addEventListener("click",function(i){i.preventDefault();let n=f();delete n[o],l(n),t.closest(".cell").remove(),h(),m()})}async function g(o,t){const e=document.createElement("div");e.classList.add("addFavorites"),e.innerHTML=window.addFavorites,t.insertBefore(e,t.firstChild),e.addEventListener("click",function(i){i.preventDefault();let n=f();n[o]="f",l(n),t.querySelector(".addFavorites").remove();const c=t.closest(".cell"),s=document.querySelector(".favorites-section > p");s&&s.remove();const r=document.querySelector(".favorites-section .woody_list_grid");r&&r.appendChild(c),h(),m()})}async function m(){const o=v();window.history.pushState({},"",window.location.origin+window.location.pathname+"?fav="+o)}function y(o){var t={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(e,i,n){t[i]=n!==void 0?n:""}),o?t[o]?t[o]:null:t}export{F as favorites,w as getFavoritesIds,S as init,_ as visited};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.