1import{u as i}from"./DsE6SUBS.js";const V=()=>{const c="uzcard_post_views",s=(e,r)=>{try{const t=localStorage.getItem(c);return t?JSON.parse(t).some(o=>o.postId===e&&o.postType===r):!1}catch{return!1}},a=(e,r)=>{try{let t=[];const n=localStorage.getItem(c);n&&(t=JSON.parse(n)),t.some(o=>o.postId===e&&o.postType===r)||(t.push({postId:e,postType:r}),localStorage.setItem(c,JSON.stringify(t)))}catch{console.warn("Failed to mark view locally")}};return{recordView:async(e,r)=>{const{recordPostView:t,getPostViewCount:n}=i();try{if(s(e,r))return await n(e,r);const o=await t(e,r);return o.incremented&&a(e,r),o.views}catch(o){console.error("[ViewCounter] Error recording view:",o);try{return await n(e,r)}catch(w){return console.error("[ViewCounter] Error fetching view count:",w),0}}},getViewCount:async(e,r)=>{const{getPostViewCount:t}=i();return t(e,r)},hasViewedLocally:s}};export{V as u};
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.