const commonjs={get1688Token(e){const o=new RegExp(`(^| )${e}=([^;]*)(;|$)`),t=document.cookie.match(o)?.[2]||"";return t?t.split("_")[0]:""},logoSrc:()=>chrome.runtime.getURL("logo.png"),buildCategoryCascaderOptions(e){const o=e=>Object.keys(e||{}).map(t=>{const n=e[t]||{},r=o(n.nodes||{});return{value:n.descriptionCategoryId||n.descriptionTypeId||t,label:n.descriptionTypeName||n.descriptionCategoryName||String(t),disabled:!!n.disabled,children:r.length?r:void 0}});return o(e?.result||e||{})}};export default commonjs;