//# allFunctionsCalledOnLoad try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="90622ea0-8937-46bb-a94d-52714af53ae9",e._sentryDebugIdIdentifier="sentry-dbid-90622ea0-8937-46bb-a94d-52714af53ae9")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"6001998"};(globalThis.webpackChunksemrush2=globalThis.webpackChunksemrush2||[]).push([[7889],{8225(e,t,i){i.d(t,{Do:()=>r});var n=i(8600);class o{normalizeEventData(e){const t={...e};return t.link_url=t.link_url?.slice(0,100),t.link_text=t.link_text?.slice(0,100),t}sendEventFromTarget(e,t,i){const n=this.normalizeEventData(i),o=t.hasAttribute("data-path"),s=t.getAttribute("data-path");n.item_location&&t.setAttribute("data-path",n.item_location),((e,t={})=>{const i={...t,semrush_team:"coffee_team",semrush_product_name:"semrush2"};window.analytics.track(e,i)})(e,n),o?t.setAttribute("data-path",s):t.removeAttribute("data-path")}getItemLocationPath(e){if(!e.hasAttribute("data-ga4-item-location"))throw new Error("Ga4DelegatedTracking: 'data-ga4-item-location' attribute is required");const t=e.getAttribute("data-ga4-item-location");if(!t)throw new Error("Ga4DelegatedTracking: non-empty 'data-ga4-item-location' value is required");return t}}class s extends o{handleEvent(e,t){const i={};t instanceof HTMLAnchorElement&&(i.link_url=t.href),(t instanceof HTMLButtonElement||t instanceof HTMLAnchorElement)&&t.innerText&&(i.link_text=t.innerText),i.item_location=this.getItemLocationPath(t),this.sendEventFromTarget("click",t,i)}}function r(e){return(0,n.m)("click","[data-ga4-click]",new s,{delegateTo:e,passive:!0})}},8600(e,t,i){function n(e,t,i,n={}){const{delegateTo:o=document,capture:s=!1,once:r=!1,passive:a=!1,signal:l}=n;if(!(o instanceof Node))throw new Error("Invalid delegateTo provided. It should be a Node instance");let d;if("function"==typeof i)d=i;else{if(!i||"function"!=typeof i.handleEvent)throw new Error("Invalid eventHandler provided. It should be a function or an object with handleEvent method");d=i.handleEvent.bind(i)}if(l?.aborted)return()=>{};const h={capture:s,passive:a},u=function(i){let n=null;if(i.composed){const e=i.composedPath(),s=e.indexOf(o);-1!==s&&(n=e.slice(0,s+1).find((e=>e instanceof Element&&e.matches(t)))||null)}n||(n=i.target?.closest(t),n&&!o.contains(n)&&(n=null)),n&&(d(i,n),r&&o.removeEventListener(e,u,h))};return l?.addEventListener("abort",(()=>{o.removeEventListener(e,u,h)}),{once:!0}),o.addEventListener(e,u,h),function(){o.removeEventListener(e,u,h)}}i.d(t,{m:()=>n})},3883(e,t,i){var n=Symbol.for("preact-signals");function o(){if(d>1)d--;else{for(var e,t=!1;void 0!==l;){var i=l;for(l=void 0,h++;void 0!==i;){var n=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&p(i))try{i.c()}catch(i){t||(e=i,t=!0)}i=n}}if(h=0,d--,t)throw e}}var s=void 0;function r(e){var t=s;s=void 0;try{return e()}finally{s=t}}var a,l=void 0,d=0,h=0,u=0;function c(e){if(void 0!==s){var t=e.n;if(void 0===t||t.t!==s)return t={i:0,S:e,p:s.s,n:void 0,t:s,e:void 0,x:void 0,r:t},void 0!==s.s&&(s.s.n=t),s.s=t,e.n=t,32&s.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=s.s,t.n=void 0,s.s.n=t,s.s=t),t}}function f(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function v(e,t){return new f(e,t)}function p(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function m(e){for(var t=e.s;void 0!==t;t=t.n){var i=t.S.n;if(void 0!==i&&(t.r=i),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function b(e){for(var t=e.s,i=void 0;void 0!==t;){var n=t.p;-1===t.i?(t.S.U(t),void 0!==n&&(n.n=t.n),void 0!==t.n&&(t.n.p=n)):i=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=n}e.s=i}function y(e,t){f.call(this,void 0),this.x=e,this.s=void 0,this.g=u-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function w(e){var t=e.u;if(e.u=void 0,"function"==typeof t){d++;var i=s;s=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,E(e),t}finally{s=i,o()}}}function E(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,w(e)}function g(e){if(s!==this)throw new Error("Out-of-order effect");b(this),s=e,this.f&=-2,8&this.f&&E(this),o()}function S(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=null==t?void 0:t.name,a&&a.push(this)}function M(e,t){var i=new S(e,t);try{i.c()}catch(e){throw i.d(),e}var n=i.d.bind(i);return n[Symbol.dispose]=n,n}f.prototype.brand=n,f.prototype.h=function(){return!0},f.prototype.S=function(e){var t=this,i=this.t;i!==e&&void 0===e.e&&(e.x=i,this.t=e,void 0!==i?i.e=e:r((function(){var e;null==(e=t.W)||e.call(t)})))},f.prototype.U=function(e){var t=this;if(void 0!==this.t){var i=e.e,n=e.x;void 0!==i&&(i.x=n,e.e=void 0),void 0!==n&&(n.e=i,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&r((function(){var e;null==(e=t.Z)||e.call(t)})))}},f.prototype.subscribe=function(e){var t=this;return M((function(){var i=t.value,n=s;s=void 0;try{e(i)}finally{s=n}}),{name:"sub"})},f.prototype.valueOf=function(){return this.value},f.prototype.toString=function(){return this.value+""},f.prototype.toJSON=function(){return this.value},f.prototype.peek=function(){var e=s;s=void 0;try{return this.value}finally{s=e}},Object.defineProperty(f.prototype,"value",{get:function(){var e=c(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(h>100)throw new Error("Cycle detected");this.v=e,this.i++,u++,d++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{o()}}}}),y.prototype=new f,y.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===u)return!0;if(this.g=u,this.f|=1,this.i>0&&!p(this))return this.f&=-2,!0;var e=s;try{m(this),s=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return s=e,b(this),this.f&=-2,!0},y.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}f.prototype.S.call(this,e)},y.prototype.U=function(e){if(void 0!==this.t&&(f.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(y.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=c(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),S.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.u=t)}finally{e()}},S.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,w(this),m(this),d++;var e=s;return s=this,g.bind(this,e)},S.prototype.N=function(){2&this.f||(this.f|=2,this.o=l,l=this)},S.prototype.d=function(){this.f|=8,1&this.f||E(this)},S.prototype.dispose=function(){this.d()};var k=i(3486),C=i(8225);const _=".srf-login-btn",A=".srf-register-btn",q=".srf-header-dropdown-popover";class x{mode=v("desktop");mobileView=v("hidden");openDropdown=v(null);activeMobileSubmenu=v(null);mobileMenuOpenedFrom=v(null)}function L(){return encodeURIComponent(`${window.location.pathname}${window.location.search}${window.location.hash}`)}class T extends HTMLElement{#e;#t=null;#i;#n;#o;#s;#r;#a;#l=null;#d=[];#h=null;#u=e=>{this.#e.mode.value=e.matches?"mobile":"desktop"};connectedCallback(){this.#t=this.querySelector("#srf-header"),this.#t?(this.#e=new x,this.#i=this.querySelector("srf-header-menu"),this.#n=this.querySelector(".srf-header__buttons"),this.#o=this.querySelector("#srf-header-desktop-menu-container"),this.#s=this.querySelector("#srf-header-desktop-buttons-container"),this.#r=this.querySelector("#srf-header-mobile-menu-container"),this.#a=this.querySelector("#srf-header-mobile-menu-content"),this.#c(),this.#f(),this.#v(),this.#p(),this.#m(),this.#l=(0,C.Do)(this.#t)):console.error("Header2026: inner #srf-header element not found")}disconnectedCallback(){this.#l&&(this.#l(),this.#l=null),this.#h?.removeEventListener("change",this.#u),this.#h=null,this.#d.forEach((e=>e())),this.#d=[],this.#t=null}#c(){const e=window[Symbol.for("sm2.header_2026.config")];e&&(0,k.b)(this.#t,{[_]:e=>{e.addEventListener("click",(()=>{e.setAttribute("href",`/login/?src=header&redirect_to=${L()}`)}))},[A]:t=>{t.addEventListener("click",(()=>{let i="/signup/?src=header";e.redirectAfterSignup&&(i+=`&redirect_to=${L()}`),t.setAttribute("href",i)}))}},!0)}#f(){this.#r.addEventListener("toggle",(e=>{"open"===e.newState?"hidden"===this.#e.mobileView.value&&(this.#e.mobileView.value="menu"):(this.#e.mobileView.value="hidden",this.#e.activeMobileSubmenu.value=null,this.#e.mobileMenuOpenedFrom.value=null)}));const e=this.querySelector(".srf-header__mobile-menu-back"),t=this.querySelector(".srf-header__mobile-menu-close");e?.addEventListener("click",(()=>{"srf-header-profile-dropdown"===this.#e.activeMobileSubmenu.value&&"profile"===this.#e.mobileMenuOpenedFrom.value?this.#r.hidePopover():this.#e.activeMobileSubmenu.value=null})),t?.addEventListener("click",(()=>{this.#r.hidePopover()}))}#v(){this.#h=window.matchMedia("(max-width: 1023px)"),this.#e.mode.value=this.#h.matches?"mobile":"desktop",this.#h.addEventListener("change",this.#u)}#p(){this.querySelectorAll(q).forEach((e=>{e.addEventListener("toggle",(t=>{"open"===t.newState?this.#e.openDropdown.value=e.id:this.#e.openDropdown.value===e.id&&(this.#e.openDropdown.value=null)}))}));this.querySelectorAll("[popovertarget]").forEach((e=>{e.addEventListener("click",(t=>{if("mobile"!==this.#e.mode.value)return;const i=e.getAttribute("popovertarget");if("srf-header-mobile-menu-container"!==i){if("srf-header-profile-dropdown"===i)return t.preventDefault(),this.#e.mobileMenuOpenedFrom.value="profile",this.#e.activeMobileSubmenu.value=i,void this.#r.showPopover();if(i&&"srf-header-lang-dropdown"!==i){t.preventDefault();const e=document.getElementById(i);if(e)try{e.hidePopover()}catch{}this.#e.activeMobileSubmenu.value=i}}else this.#e.mobileMenuOpenedFrom.value="burger"}))}))}#b(){"mobile"===this.#e.mode.value?(this.querySelectorAll("srf-header-dropdown-items, #srf-header-profile-dropdown").forEach((e=>{e.removeAttribute("popover")})),"hidden"!==this.#e.mobileView.value?this.#y():this.#w()):"desktop"===this.#e.mode.value?(this.querySelectorAll("srf-header-dropdown-items, #srf-header-profile-dropdown").forEach((e=>{if(e.setAttribute("popover","auto"),e.style.display="",e.parentElement!==this&&this.appendChild(e),"srf-header-profile-dropdown"===e.id){const t=e.querySelector(".srf-header__profile-menu");t&&(t.style.display="")}})),this.#i.style.display="",this.#n.style.display="",this.#e.activeMobileSubmenu.value&&(this.#e.activeMobileSubmenu.value=null),this.#w()):this.#w()}#y(){const e=this.#e.activeMobileSubmenu.value;if(e){this.setAttribute("mobile-view","menu-submenu");const t=this.querySelector(".srf-header__mobile-menu-back");t?.removeAttribute("hidden");const i=this.querySelector(".srf-header__mobile-menu-logo");i?.setAttribute("hidden","true"),this.querySelectorAll("srf-header-dropdown-items, #srf-header-profile-dropdown").forEach((e=>{e.style.display="none"})),this.#i.style.display="none",this.#n.style.display="none";const n=document.getElementById(e);if(!n)return;if(this.#a.appendChild(n),n.style.display="grid","srf-header-profile-dropdown"===n.id){const e=n.querySelector(".srf-header__profile-menu");e&&(e.style.display="flex")}}else{this.setAttribute("mobile-view","menu");const e=this.querySelector(".srf-header__mobile-menu-back");e?.setAttribute("hidden","true");const t=this.querySelector(".srf-header__mobile-menu-logo");t?.removeAttribute("hidden"),this.#i.style.display="",this.#n.style.display="",this.querySelectorAll("srf-header-dropdown-items, #srf-header-profile-dropdown").forEach((e=>{e.style.display="none"}))}}#m(){this.#d.push(M((()=>{"mobile"!==this.#e.mode.value&&"desktop"!==this.#e.mode.value||(this.#e.mobileView.value="hidden",this.#e.activeMobileSubmenu.value=null,this.#e.mobileMenuOpenedFrom.value=null)}))),this.#d.push(M((()=>{"mobile"!==this.#e.mode.value&&"desktop"!==this.#e.mode.value||this.#E()}))),this.#d.push(M((()=>{this.#b()}))),this.#d.push(M((()=>{this.#g()}))),this.#d.push(M((()=>{this.#S()}))),this.#d.push(M((()=>{this.#e.mode.value;const e=this.#e.openDropdown.value;this.querySelectorAll(q).forEach((t=>{const i=this.querySelector(`[popovertarget="${t.id}"]`);let n=t.id===e;"srf-header-profile-dropdown"===t.id&&"srf-header-lang-dropdown"===e&&(n=!0),i?.setAttribute("aria-expanded",n?"true":"false")}))})))}#g(){const e="desktop"===this.#e.mode.value?this.#o:this.#a;this.#i.parentElement!==e&&e.appendChild(this.#i)}#S(){const e="desktop"===this.#e.mode.value?this.#s:this.#a;this.#n.parentElement!==e&&e.appendChild(this.#n)}#w(){this.setAttribute("mobile-view",this.#e.mobileView.value)}#E(){this.#e.openDropdown.value=null,"mobile"===this.#e.mode.value&&(this.#e.activeMobileSubmenu.value=null,this.#e.mobileMenuOpenedFrom.value=null);[...this.querySelectorAll(q),this.#r].forEach((e=>{try{e.hidePopover()}catch{}}))}}customElements.define("srf-header-2026",T)}},e=>{e.O(0,[2063,3486],(()=>{return t=3883,e(e.s=t);var t}));e.O()}]);