(()=>{const e="nte-settings-menu-style";async function n(){try{if(chrome.runtime?.openOptionsPage)return void chrome.runtime.openOptionsPage()}catch{}var e;await(e={type:"open_extension_settings"},new Promise(n=>{try{const t=chrome.runtime.sendMessage(e,e=>{n(e)});t&&"function"==typeof t.then&&t.then(e=>n(e),()=>n(null))}catch{n(null)}}))}function t(){const e=document.querySelector("#settings-icon")||document.querySelector('[data-testid="settings-icon"]')||document.querySelector(".icon-nav-settings");e instanceof HTMLElement?e.click():document.body?.click()}function o(e){"1"!==e.dataset.nteSettingsBound&&(e.dataset.nteSettingsBound="1",e.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),n(),setTimeout(t,0)}))}function s(e){const n=function(){try{return chrome.runtime.getURL("assets/icons/logo32.png")}catch{return""}}();e.replaceChildren();const t=document.createElement("span");if(t.className="nte-settings-menu-inner",n){const e=document.createElement("img");e.className="nte-settings-menu-logo",e.src=n,e.alt="",e.width=18,e.height=18,e.decoding="async",t.appendChild(e)}const o=document.createElement("span");o.className="nte-settings-menu-wrap";const s=document.createElement("span");s.className="nte-settings-menu-primary",s.textContent="nevos";const i=document.createElement("span");i.className="nte-settings-menu-secondary",i.textContent="trading extension",o.append(s,i),t.appendChild(o),e.appendChild(t)}function i(){const n=document.getElementById("settings-popover-menu");if(!n)return;!function(){if(document.getElementById(e))return;const n=document.createElement("style");n.id=e,n.textContent="\n      #settings-popover-menu .nte-settings-toggle{\n        display:flex;\n        align-items:center;\n        gap:8px;\n        padding-top:6px;\n        padding-bottom:6px;\n        line-height:1.1;\n        text-decoration:none;\n        cursor:pointer;\n      }\n      #settings-popover-menu .nte-settings-toggle:hover,\n      #settings-popover-menu .nte-settings-toggle:focus{\n        text-decoration:none;\n      }\n      #settings-popover-menu .nte-settings-menu-inner{\n        display:flex;\n        align-items:center;\n        gap:8px;\n        min-width:0;\n      }\n      #settings-popover-menu .nte-settings-menu-logo{\n        width:18px;\n        height:18px;\n        flex:0 0 18px;\n        border-radius:4px;\n        object-fit:contain;\n        display:block;\n      }\n      #settings-popover-menu .nte-settings-menu-wrap{\n        display:block;\n        min-width:0;\n      }\n      #settings-popover-menu .nte-settings-menu-primary{\n        display:block;\n        font-size:14px;\n        font-weight:500;\n        color:inherit;\n      }\n      #settings-popover-menu .nte-settings-menu-secondary{\n        display:block;\n        margin-top:2px;\n        font-size:10px;\n        font-weight:400;\n        letter-spacing:.02em;\n        opacity:.52;\n        color:inherit;\n      }\n      .light-theme #settings-popover-menu .nte-settings-menu-secondary{\n        opacity:.48;\n      }\n    ",document.head.appendChild(n)}();let t=n.querySelector(".nte-settings-toggle");if(t)return t.querySelector(".nte-settings-menu-logo")||s(t),void o(t);const i=document.createElement("li");t=document.createElement("a"),t.className="rbx-menu-item nte-settings-toggle",t.href="#",t.setAttribute("role","button"),s(t),o(t),i.appendChild(t);const c=function(e){for(const n of e.querySelectorAll(":scope > li")){const e=n.querySelector("a.rbx-menu-item");if(!e)continue;const t=String(e.getAttribute("href")||"");if(t.includes("/my/account")&&!t.includes("roseal")&&!e.classList.contains("btr-settings-toggle")&&!e.classList.contains("nte-settings-toggle"))return n}return null}(n);c?n.insertBefore(i,c):n.appendChild(i)}i();let c=0;new MutationObserver(()=>{c||(c=requestAnimationFrame(()=>{c=0,i()}))}).observe(document.documentElement,{childList:!0,subtree:!0})})();