var e,t=new Uint8Array(16);function n(){if(!e&&(e=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return e(t)}var r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));function i(e,t=0){return r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+`-`+r[e[t+4]]+r[e[t+5]]+`-`+r[e[t+6]]+r[e[t+7]]+`-`+r[e[t+8]]+r[e[t+9]]+`-`+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]}var a={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function o(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();e||={};let o=e.random||(e.rng||n)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r||=0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return i(o)}var s=globalThis.browser?.runtime?.id?globalThis.browser:globalThis.chrome,c=s.cookies?.getAll??null,l=s.cookies?.get??null,u=s.cookies?.remove??null,d=s.cookies?.set??null,f=s.storage?.local??null;s.storage?.sync;var p=s.tabs?.create??null,m=s.tabs?.reload??null,h=s.tabs?.query??null;s.tabs?.get;var g=s.tabs?.sendMessage??null,_=s.tabs?.remove??null;s.tabs?.onUpdated;var v=s.runtime?.onMessage??null;s.runtime?.sendMessage,s.runtime?.id,s.webRequest,s.notifications?.create,s.alarms;var y=()=>s.extension?.getViews?s.extension.getViews({type:`popup`}).some(e=>e===window):!1,b=y(),x=`EVENT_SHOPEE_GET_HEADER_SHOPEE`,S=`EVENT_SHOPEE_PRODUCT_SELECT_VARIANT`,C=`EVENT_TAB_FETCH_URL`,w=`EVENT_TAB_GET_WEBCONTENT_HTML`;export{y as _,p as a,_ as c,c as d,u as f,b as g,v as h,w as i,g as l,f as m,S as n,h as o,d as p,C as r,m as s,x as t,l as u,s as v,o as y};