import{r as e}from"./norm-CeclA1Tu.js";var t=`offer_lens_telemetry_v1`,n=t=>{let n={};if(!t||typeof t!=`object`)return n;for(let r of Object.keys(t)){let i=e(r);if(!i||/(resume|jd|content|html|text|prompt|screenshot|image|blob|dataurl|token|key|auth)/i.test(i))continue;let a=t[r];if(typeof a==`number`&&Number.isFinite(a))n[i]=a;else if(typeof a==`boolean`)n[i]=a;else if(typeof a==`string`){let t=e(a);t&&t.length<=120&&(n[i]=t)}else a??(n[i]=null)}return n},r=async e=>new Promise(t=>{try{chrome.storage?.local?.get?.(e,n=>t({...e,...n}))}catch{t(e)}}),i=async e=>new Promise(t=>{try{chrome.storage?.local?.set?.(e,()=>t())}catch{t()}}),a=async(a,o)=>{let s=e(a);if(!s)return;let c=await r({[t]:[]}),l=[...(Array.isArray(c?.[t])?c[t]:[]).slice(-199),{ts:Date.now(),name:s,data:o?n(o):void 0}];await i({[t]:l})};export{a as t};