"use strict";(()=>{var G=Object.defineProperty,K=(t,e,n)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,f=(t,e,n)=>(K(t,typeof e!="symbol"?e+"":e,n),n);function w(){}function J(t){return t()}function M(){return Object.create(null)}function O(t){t.forEach(J)}function F(t){return typeof t=="function"}function Q(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function U(t){return Object.keys(t).length===0}function g(t,e){t.appendChild(e)}function W(t,e,n){let r=X(t);if(!r.getElementById(e)){let i=p("style");i.id=e,i.textContent=n,Y(r,i)}}function X(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Y(t,e){return g(t.head||t,e),e.sheet}function P(t,e,n){t.insertBefore(e,n||null)}function k(t){t.parentNode&&t.parentNode.removeChild(t)}function Z(t,e){for(let n=0;nt.removeEventListener(e,n,r)}function y(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function nt(t){return Array.from(t.childNodes)}function q(t,e,n){t.classList.toggle(e,!!n)}function rt(t){let e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}var x;function v(t){x=t}function ot(){if(!x)throw new Error("Function called outside component initialization");return x}function st(t){ot().$$.on_mount.push(t)}var m=[],R=[],_=[],z=[],it=Promise.resolve(),A=!1;function ct(){A||(A=!0,it.then(E))}function L(t){_.push(t)}var S=new Set,b=0;function E(){if(b!==0)return;let t=x;do{try{for(;bt.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),_=e}var $t=new Set;function at(t,e){t&&t.i&&($t.delete(t),t.i(e))}function D(t){return t?.length!==void 0?t:Array.from(t)}function ft(t,e,n){let{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),L(()=>{let o=t.$$.on_mount.map(J).filter(F);t.$$.on_destroy?t.$$.on_destroy.push(...o):O(o),t.$$.on_mount=[]}),i.forEach(L)}function ht(t,e){let n=t.$$;n.fragment!==null&&(ut(n.after_update),O(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function dt(t,e){t.$$.dirty[0]===-1&&(m.push(t),ct(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let B=d.length?d[0]:h;return l.ctx&&i(l.ctx[a],l.ctx[a]=B)&&(!l.skip_bound&&l.bound[a]&&l.bound[a](B),$&&dt(t,a)),h}):[],l.update(),$=!0,O(l.before_update),l.fragment=r?r(l.ctx):!1,e.target){if(e.hydrate){let a=nt(e.target);l.fragment&&l.fragment.l(a),a.forEach(k)}else l.fragment&&l.fragment.c();e.intro&&at(t.$$.fragment),ft(t,e.target,e.anchor),E()}v(u)}var V;typeof HTMLElement=="function"&&(V=class extends HTMLElement{constructor(t,e,n){super(),f(this,"$$ctor"),f(this,"$$s"),f(this,"$$c"),f(this,"$$cn",!1),f(this,"$$d",{}),f(this,"$$r",!1),f(this,"$$p_d",{}),f(this,"$$l",{}),f(this,"$$l_u",new Map),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){let r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(o){return()=>{let s;return{c:function(){s=p("slot"),o!=="default"&&y(s,"name",o)},m:function(c,u){P(c,s,u)},d:function(c){c&&k(s)}}}};var t=e;if(await Promise.resolve(),!this.$$cn)return;let n={},r=rt(this);for(let o of this.$$s)o in r&&(n[o]=[e(o)]);for(let o of this.attributes){let s=this.$$g_p(o.name);s in this.$$d||(this.$$d[s]=j(s,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});let i=()=>{this.$$r=!0;for(let o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){let s=j(o,this.$$d[o],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,s)}this.$$r=!1};this.$$c.$$.after_update.push(i),i();for(let o in this.$$l)for(let s of this.$$l[o]){let c=this.$$c.$on(o,s);this.$$l_u.set(s,c)}this.$$l={}}}attributeChangedCallback(t,e,n){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=j(t,n,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function j(t,e,n,r){var i;let o=(i=n[t])==null?void 0:i.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function bt(t,e,n,r,i,o){let s=class extends V{constructor(){super(t,n,i),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(c=>(e[c].attribute||c).toLowerCase())}};return Object.keys(e).forEach(c=>{Object.defineProperty(s.prototype,c,{get(){return this.$$c&&c in this.$$c?this.$$c[c]:this.$$d[c]},set(u){var l;u=j(c,u,e),this.$$d[c]=u,(l=this.$$c)==null||l.$set({[c]:u})}})}),r.forEach(c=>{Object.defineProperty(s.prototype,c,{get(){var u;return(u=this.$$c)==null?void 0:u[c]}})}),o&&(s=o(s)),t.element=s,s}var N=class{constructor(){f(this,"$$"),f(this,"$$set")}$destroy(){ht(this,1),this.$destroy=w}$on(e,n){if(!F(n))return w;let r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{let i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!U(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}},gt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(gt);function mt(t){W(t,"rf-18sij80",".tabs-buttons-container.rf-18sij80.rf-18sij80{display:flex;border-bottom:1px solid var(--soap400);width:100%;gap:24px}.tab-wrapper.rf-18sij80.rf-18sij80{display:flex;flex-direction:column;gap:21px;justify-content:space-between}.tab-wrapper.rf-18sij80 .tabs-button.rf-18sij80{background:transparent;border:none;padding:0}.tab-wrapper.rf-18sij80 .tabs-button .tabs-button-text.rf-18sij80{font-size:20px;font-weight:500;line-height:28px}.tab-wrapper.rf-18sij80 .tab-underline.rf-18sij80{border-top-left-radius:2px;border-top-right-radius:2px;width:100%;height:3px;background:transparent;transition:background 0.3s}.tab-wrapper.active.rf-18sij80 .tabs-button .tabs-button-text.rf-18sij80{color:var(--blueberry400)}.tab-wrapper.active.rf-18sij80 .tab-underline.rf-18sij80{background:var(--blueberry400)}")}function H(t,e,n){let r=t.slice();return r[7]=e[n],r[9]=n,r}function I(t){let e,n,r,i,o,s,c,u;function l(){return t[5](t[9])}return{c(){e=p("div"),n=p("button"),r=p("span"),r.textContent=`${t[7]}`,i=T(),o=p("div"),s=T(),y(r,"class","tabs-button-text rf-18sij80"),y(n,"class","tabs-button rf-18sij80"),y(o,"class","tab-underline rf-18sij80"),y(e,"class","tab-wrapper rf-18sij80"),q(e,"active",t[9]===t[0])},m($,a){P($,e,a),g(e,n),g(n,r),g(e,i),g(e,o),g(e,s),c||(u=et(n,"click",l),c=!0)},p($,a){t=$,a&1&&q(e,"active",t[9]===t[0])},d($){$&&k(e),c=!1,u()}}}function yt(t){let e,n=D(t[1]),r=[];for(let i=0;i{let h=document.querySelector(`.page-builder-tab-content.tab-section-${a+1}`);h&&(h.style.scrollMarginTop=`${i}px`)});function u($,a=!0){n(0,o=$);let h=document.querySelectorAll(`.page-builder-tab-content.tab-section-${$+1}`);c?.forEach(d=>{d.style.display="none"}),h?.forEach(d=>{d.style.display="block"}),a&&setTimeout(()=>{var d;(d=h[0])==null||d.scrollIntoView({block:"start",behavior:"smooth"})},0)}st(()=>{u(0,!1)});let l=$=>u($);return t.$$set=$=>{"tabs"in $&&n(3,r=$.tabs),"sectionScrollOffset"in $&&n(4,i=$.sectionScrollOffset)},[o,s,u,r,i,l]}var C=class extends N{constructor(e){super(),pt(this,e,_t,yt,Q,{tabs:3,sectionScrollOffset:4},mt)}get tabs(){return this.$$.ctx[3]}set tabs(e){this.$$set({tabs:e}),E()}get sectionScrollOffset(){return this.$$.ctx[4]}set sectionScrollOffset(e){this.$$set({sectionScrollOffset:e}),E()}};customElements.define("page-builder-tab-sections",bt(C,{tabs:{},sectionScrollOffset:{}},[],[],!1));})();